Yasr – Yet Another Stars Rating - Version 0.4.3

Version Description

  • Chart Top 10 by visitors have been rewritten. Now it's much much faster
  • Added text on chart Top 10 overall ratings
  • Minor changes
Download this release

Release Info

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

Code changes from version 0.4.2 to 0.4.3

css/yasr.css CHANGED
@@ -339,6 +339,13 @@
339
 
340
  /****** NON ADMIN RULES ******/
341
 
 
 
 
 
 
 
 
342
  .yasr_schema{
343
  font-size: small;
344
  }
@@ -375,4 +382,8 @@
375
 
376
  .yasr-visitor-shortcode-small-already-voted-text{
377
  display: block;
 
 
 
 
378
  }
339
 
340
  /****** NON ADMIN RULES ******/
341
 
342
+ .loader-visitor-rating-chart {
343
+ display: none;
344
+ text-align: center;
345
+ width: 50%;
346
+ margin: 0 auto;
347
+ }
348
+
349
  .yasr_schema{
350
  font-size: small;
351
  }
382
 
383
  .yasr-visitor-shortcode-small-already-voted-text{
384
  display: block;
385
+ }
386
+
387
+ .yasr-highest-rated-text{
388
+ display: block;
389
  }
languages/yasr.mo CHANGED
Binary file
languages/yasr.pot CHANGED
@@ -1,23 +1,23 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Yasr Translation\n"
4
- "POT-Creation-Date: 2014-07-18 15:07+0100\n"
5
- "PO-Revision-Date: 2014-07-18 15:07+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:73
19
  #: ../lib/yasr-ajax-functions.php:29 ../lib/yasr-ajax-functions.php:89
20
- #: ../lib/yasr-ajax-functions.php:228 ../lib/yasr-ajax-functions.php:646
21
  msgid "You do not have sufficient permissions to access this page."
22
  msgstr ""
23
 
@@ -130,397 +130,444 @@ msgid "Choose wich set you want to use"
130
  msgstr ""
131
 
132
  #: ../yasr-metabox-multiple-rating.php:26
133
- #: ../lib/yasr-settings-functions.php:350
134
  msgid "Select"
135
  msgstr ""
136
 
137
- #: ../yasr-metabox-overall-rating.php:16
138
  msgid "Rate this article / item"
139
  msgstr ""
140
 
141
- #: ../yasr-metabox-overall-rating.php:24
142
- #: ../lib/yasr-shortcode-functions.php:108 ../lib/yasr-functions.php:232
143
  msgid "Loading, please wait"
144
  msgstr ""
145
 
146
- #: ../lib/yasr-shortcode-functions.php:128
147
- #: ../lib/yasr-shortcode-functions.php:139
148
- #: ../lib/yasr-shortcode-functions.php:157
149
  #: ../lib/yasr-shortcode-functions.php:186
150
- #: ../lib/yasr-shortcode-functions.php:194
151
- #: ../lib/yasr-shortcode-functions.php:212 ../lib/yasr-functions.php:253
152
- #: ../lib/yasr-functions.php:264 ../lib/yasr-functions.php:282
153
- #: ../lib/yasr-functions.php:311 ../lib/yasr-functions.php:319
154
- #: ../lib/yasr-functions.php:337 ../lib/yasr-ajax-functions.php:880
155
- #: ../lib/yasr-ajax-functions.php:916 ../lib/yasr-ajax-functions.php:923
156
- msgid "Average Rating"
157
- msgstr ""
158
-
159
- #: ../lib/yasr-shortcode-functions.php:128
160
- #: ../lib/yasr-shortcode-functions.php:186 ../lib/yasr-functions.php:253
161
- #: ../lib/yasr-functions.php:311
162
- msgid "User "
163
- msgstr ""
164
-
165
- #: ../lib/yasr-shortcode-functions.php:144
166
- #: ../lib/yasr-shortcode-functions.php:162
167
- #: ../lib/yasr-shortcode-functions.php:199
168
- #: ../lib/yasr-shortcode-functions.php:217 ../lib/yasr-functions.php:269
169
- #: ../lib/yasr-functions.php:287 ../lib/yasr-functions.php:324
170
- #: ../lib/yasr-functions.php:342
171
- msgid "No rating yet"
172
- msgstr ""
173
-
174
  #: ../lib/yasr-shortcode-functions.php:212
175
- #: ../lib/yasr-shortcode-functions.php:217 ../lib/yasr-functions.php:337
176
- #: ../lib/yasr-functions.php:342
177
- msgid "You must sign to vote"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  msgstr ""
179
 
180
- #: ../lib/yasr-shortcode-functions.php:415
181
- msgid "You don't have any votes stored"
 
 
 
 
 
182
  msgstr ""
183
 
184
- #: ../lib/yasr-shortcode-functions.php:475 ../lib/yasr-ajax-functions.php:987
185
- #: ../lib/yasr-ajax-functions.php:1032
186
- msgid "Total:"
187
  msgstr ""
188
 
189
- #: ../lib/yasr-shortcode-functions.php:475 ../lib/yasr-ajax-functions.php:987
190
- #: ../lib/yasr-ajax-functions.php:1032
191
- msgid "Average"
192
  msgstr ""
193
 
194
- #: ../lib/yasr-shortcode-functions.php:567
195
  msgid "You don't have any user votes stored"
196
  msgstr ""
197
 
198
- #: ../lib/yasr-shortcode-functions.php:636
199
  msgid ""
200
  "Problem while retriving the top 5 most active reviewers. Did you published "
201
  "any review?"
202
  msgstr ""
203
 
204
- #: ../lib/yasr-shortcode-functions.php:704
205
  msgid ""
206
  "Problem while retriving the top 10 active users chart. Are you sure you have "
207
  "votes to show?"
208
  msgstr ""
209
 
210
- #: ../lib/yasr-settings-functions.php:30
211
  msgid "General settings"
212
  msgstr ""
213
 
214
- #: ../lib/yasr-settings-functions.php:31
215
- msgid "Auto insert otions"
216
  msgstr ""
217
 
218
- #: ../lib/yasr-settings-functions.php:32
219
  msgid "Show overall rating in Home Page?"
220
  msgstr ""
221
 
222
- #: ../lib/yasr-settings-functions.php:33
223
  msgid "Insert custom text to show before / after stars"
224
  msgstr ""
225
 
226
- #: ../lib/yasr-settings-functions.php:34
227
  msgid "Which color scheme do you want to use?"
228
  msgstr ""
229
 
230
- #: ../lib/yasr-settings-functions.php:35
231
  msgid "Allow only logged in user to vote?"
232
  msgstr ""
233
 
234
- #: ../lib/yasr-settings-functions.php:36
235
  msgid "Which rich snippets do you want to use?"
236
  msgstr ""
237
 
238
- #: ../lib/yasr-settings-functions.php:50
239
  msgid "Use Auto Insert?"
240
  msgstr ""
241
 
242
- #: ../lib/yasr-settings-functions.php:53
243
- #: ../lib/yasr-settings-functions.php:107
244
  #: ../lib/yasr-settings-functions.php:127
245
- #: ../lib/yasr-settings-functions.php:152
 
246
  msgid "Yes"
247
  msgstr ""
248
 
249
- #: ../lib/yasr-settings-functions.php:71
250
- #: ../lib/yasr-settings-functions.php:112
251
  #: ../lib/yasr-settings-functions.php:132
252
- #: ../lib/yasr-settings-functions.php:169
 
253
  msgid "No"
254
  msgstr ""
255
 
256
- #: ../lib/yasr-settings-functions.php:77
257
  msgid "What?"
258
  msgstr ""
259
 
260
- #: ../lib/yasr-settings-functions.php:80
261
  msgid "Overall Rating / Author Rating"
262
  msgstr ""
263
 
264
- #: ../lib/yasr-settings-functions.php:84 ../lib/yasr-ajax-functions.php:331
265
  msgid "Visitor Votes"
266
  msgstr ""
267
 
268
- #: ../lib/yasr-settings-functions.php:88
269
  msgid "Both"
270
  msgstr ""
271
 
272
- #: ../lib/yasr-settings-functions.php:92
273
  msgid "Where?"
274
  msgstr ""
275
 
276
- #: ../lib/yasr-settings-functions.php:95
277
  msgid "Before the post"
278
  msgstr ""
279
 
280
- #: ../lib/yasr-settings-functions.php:99
281
  msgid "After the post"
282
  msgstr ""
283
 
284
- #: ../lib/yasr-settings-functions.php:104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  msgid "Exclude Pages?"
286
  msgstr ""
287
 
288
- #: ../lib/yasr-settings-functions.php:136
289
  msgid ""
290
  "If you enable this, \"Overall Rating\" will be showed not only in the single "
291
  "article or page, but also in pages like Home Page, category pages or "
292
  "archives."
293
  msgstr ""
294
 
295
- #: ../lib/yasr-settings-functions.php:176
296
  msgid "Custom text to display before overall rating"
297
  msgstr ""
298
 
299
- #: ../lib/yasr-settings-functions.php:181
300
  msgid "Custom text to display before visitor rating"
301
  msgstr ""
302
 
303
- #: ../lib/yasr-settings-functions.php:186
304
  msgid "Custom text to display when a non logged user has already rated"
305
  msgstr ""
306
 
307
- #: ../lib/yasr-settings-functions.php:202
308
  msgid "Light"
309
  msgstr ""
310
 
311
- #: ../lib/yasr-settings-functions.php:207
312
  msgid "Dark"
313
  msgstr ""
314
 
315
- #: ../lib/yasr-settings-functions.php:212
316
  msgid "Preview"
317
  msgstr ""
318
 
319
- #: ../lib/yasr-settings-functions.php:217
320
  msgid "Light theme"
321
  msgstr ""
322
 
323
- #: ../lib/yasr-settings-functions.php:222
324
  msgid "Dark Theme"
325
  msgstr ""
326
 
327
- #: ../lib/yasr-settings-functions.php:240
328
  msgid "Allow only logged-in users"
329
  msgstr ""
330
 
331
- #: ../lib/yasr-settings-functions.php:244
332
  msgid "Allow everybody (logged in and anonymous)"
333
  msgstr ""
334
 
335
- #: ../lib/yasr-settings-functions.php:261
336
  msgid "Review Rating"
337
  msgstr ""
338
 
339
- #: ../lib/yasr-settings-functions.php:265
340
  msgid "Aggregate Rating"
341
  msgstr ""
342
 
343
- #: ../lib/yasr-settings-functions.php:270
344
  msgid "What is this?"
345
  msgstr ""
346
 
347
- #: ../lib/yasr-settings-functions.php:275
348
  msgid ""
349
  "If you select \"Review Rating\", your site will be indexed from search "
350
  "engines like this: "
351
  msgstr ""
352
 
353
- #: ../lib/yasr-settings-functions.php:280
354
  msgid ""
355
  "If, instead, you choose \"Aggregate Rating\", your site will be indexed like "
356
  "this"
357
  msgstr ""
358
 
359
- #: ../lib/yasr-settings-functions.php:296
360
  msgid ""
361
  "Field Name, Element#1 and Element#2 MUST be filled and must be long at least "
362
  "3 characters"
363
  msgstr ""
364
 
365
- #: ../lib/yasr-settings-functions.php:299
366
  msgid "Name"
367
  msgstr ""
368
 
369
- #: ../lib/yasr-settings-functions.php:304
370
  msgid "You can insert up to nine element"
371
  msgstr ""
372
 
373
- #: ../lib/yasr-settings-functions.php:309
374
  msgid "Element "
375
  msgstr ""
376
 
377
- #: ../lib/yasr-settings-functions.php:319
378
  msgid "Create New Set"
379
  msgstr ""
380
 
381
- #: ../lib/yasr-settings-functions.php:342
382
  msgid "Wich set do you want to edit or remove?"
383
  msgstr ""
384
 
385
- #: ../lib/yasr-settings-functions.php:382
386
- #: ../lib/yasr-settings-functions.php:500
387
  msgid "Field name"
388
  msgstr ""
389
 
390
- #: ../lib/yasr-settings-functions.php:386
391
- #: ../lib/yasr-settings-functions.php:504
392
  msgid "Remove"
393
  msgstr ""
394
 
395
- #: ../lib/yasr-settings-functions.php:441
396
- #: ../lib/yasr-settings-functions.php:559
397
  msgid ""
398
  "If you remove something you will remove all the votes for that set or field. "
399
  "This operation CAN'T BE undone."
400
  msgstr ""
401
 
402
- #: ../lib/yasr-settings-functions.php:448
403
- #: ../lib/yasr-settings-functions.php:566
404
  msgid "You can use up to 9 elements"
405
  msgstr ""
406
 
407
- #: ../lib/yasr-settings-functions.php:450
408
- #: ../lib/yasr-settings-functions.php:568
409
  msgid "Add element"
410
  msgstr ""
411
 
412
- #: ../lib/yasr-settings-functions.php:452
413
- #: ../lib/yasr-settings-functions.php:570
414
  msgid "Save changes"
415
  msgstr ""
416
 
417
- #: ../lib/yasr-settings-functions.php:462
418
  msgid "No multiple set were found"
419
  msgstr ""
420
 
421
- #: ../lib/yasr-settings-functions.php:701
422
- #: ../lib/yasr-settings-functions.php:956
423
  msgid "Settings Saved"
424
  msgstr ""
425
 
426
- #: ../lib/yasr-settings-functions.php:706
427
  msgid "Something goes wrong trying insert set field name. Please report it"
428
  msgstr ""
429
 
430
- #: ../lib/yasr-settings-functions.php:712
431
  msgid "Something goes wrong trying insert multi set name. Please report it"
432
  msgstr ""
433
 
434
- #: ../lib/yasr-settings-functions.php:787
435
  msgid "Something goes wrong trying to delete a multi-set . Please report it"
436
  msgstr ""
437
 
438
- #: ../lib/yasr-settings-functions.php:792
439
  msgid ""
440
  "Something goes wrong trying to delete data fields for a set. Please report it"
441
  msgstr ""
442
 
443
- #: ../lib/yasr-settings-functions.php:830
444
  msgid ""
445
  "Something goes wrong trying to delete a multi-set element. Please report it"
446
  msgstr ""
447
 
448
- #: ../lib/yasr-settings-functions.php:889
449
  msgid ""
450
  "Something goes wrong trying to update a multi set element. Please report it"
451
  msgstr ""
452
 
453
- #: ../lib/yasr-settings-functions.php:941
454
  msgid ""
455
  "Something goes wrong trying to insert set field name in edit form. Please "
456
  "report it"
457
  msgstr ""
458
 
459
- #: ../lib/yasr-settings-functions.php:987
460
  msgid "No previous Gd Star Ratings installation was found"
461
  msgstr ""
462
 
463
- #: ../lib/yasr-db-functions.php:213 ../lib/yasr-ajax-functions.php:658
464
  msgid "No Recenet votes yet"
465
  msgstr ""
466
 
467
- #: ../lib/yasr-db-functions.php:228 ../lib/yasr-ajax-functions.php:671
468
  msgid "anonymous"
469
  msgstr ""
470
 
471
- #: ../lib/yasr-db-functions.php:251 ../lib/yasr-ajax-functions.php:694
472
  msgid "Ip address"
473
  msgstr ""
474
 
475
- #: ../lib/yasr-db-functions.php:292 ../lib/yasr-ajax-functions.php:735
476
  msgid "Pages"
477
  msgstr ""
478
 
479
- #: ../lib/yasr-functions.php:62
480
  msgid "Yet Another Stars Rating: Settings"
481
  msgstr ""
482
 
483
- #: ../lib/yasr-functions.php:92 ../lib/yasr-functions.php:99
484
  msgid "Overall Rating"
485
  msgstr ""
486
 
487
- #: ../lib/yasr-functions.php:93
488
  msgid "Yet Another Stars Rating: Multiple set"
489
  msgstr ""
490
 
491
- #: ../lib/yasr-functions.php:109
492
  msgid "You don't have enought privileges to insert overall rating"
493
  msgstr ""
494
 
495
- #: ../lib/yasr-functions.php:119
496
  msgid "You don't have enought privileges to insert multi-set"
497
  msgstr ""
498
 
499
- #: ../lib/yasr-functions.php:545
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  msgid " reviewed by "
501
  msgstr ""
502
 
503
- #: ../lib/yasr-functions.php:546
504
  msgid " on "
505
  msgstr ""
506
 
507
- #: ../lib/yasr-functions.php:547 ../lib/yasr-functions.php:578
508
  msgid " rated "
509
  msgstr ""
510
 
511
- #: ../lib/yasr-functions.php:547
512
  msgid " on 5.0"
513
  msgstr ""
514
 
515
- #: ../lib/yasr-functions.php:578
516
  msgid " out of "
517
  msgstr ""
518
 
519
- #: ../lib/yasr-functions.php:579
520
  msgid " based on "
521
  msgstr ""
522
 
523
- #: ../lib/yasr-functions.php:579
524
  msgid " user ratings"
525
  msgstr ""
526
 
@@ -540,132 +587,128 @@ msgstr ""
540
  msgid "Choose a vote for every element"
541
  msgstr ""
542
 
543
- #: ../lib/yasr-ajax-functions.php:326
544
  msgid "Overall Rating / Review"
545
  msgstr ""
546
 
547
- #: ../lib/yasr-ajax-functions.php:328
548
  msgid "Insert Overall Rating / Review for this post"
549
  msgstr ""
550
 
551
- #: ../lib/yasr-ajax-functions.php:333
 
 
 
 
552
  msgid "Insert the ability for your visitor to vote"
553
  msgstr ""
554
 
555
- #: ../lib/yasr-ajax-functions.php:339
556
  msgid "If you want to insert a multi-set, pick one:"
557
  msgstr ""
558
 
559
- #: ../lib/yasr-ajax-functions.php:345
560
  msgid "Choose wich set you want to insert."
561
  msgstr ""
562
 
563
- #: ../lib/yasr-ajax-functions.php:353
564
  msgid "Insert Multiset:"
565
  msgstr ""
566
 
567
- #: ../lib/yasr-ajax-functions.php:366
568
  msgid "Top 10 overall ratings"
569
  msgstr ""
570
 
571
- #: ../lib/yasr-ajax-functions.php:368
572
  msgid "Insert Top 10 highest rated by post author"
573
  msgstr ""
574
 
575
- #: ../lib/yasr-ajax-functions.php:372
576
  msgid "Top 10 by visitors"
577
  msgstr ""
578
 
579
- #: ../lib/yasr-ajax-functions.php:374
580
  msgid "Insert Top 10 most or higher rated posts from visitors"
581
  msgstr ""
582
 
583
- #: ../lib/yasr-ajax-functions.php:378
584
  msgid "Most active reviewers"
585
  msgstr ""
586
 
587
- #: ../lib/yasr-ajax-functions.php:380
588
  msgid "Insert Top 5 active reviewers"
589
  msgstr ""
590
 
591
- #: ../lib/yasr-ajax-functions.php:384
592
  msgid "Most active users"
593
  msgstr ""
594
 
595
- #: ../lib/yasr-ajax-functions.php:386
596
  msgid "Insert Top 10 active users in visitor ratings"
597
  msgstr ""
598
 
599
- #: ../lib/yasr-ajax-functions.php:515
600
  msgid "Reviews and visitor votes have been successfull imported."
601
  msgstr ""
602
 
603
- #: ../lib/yasr-ajax-functions.php:521
604
  msgid ""
605
  "Step2: I will check if you used multiple set and if so I will import it. "
606
  "THIS MAY TAKE A WHILE!"
607
  msgstr ""
608
 
609
- #: ../lib/yasr-ajax-functions.php:523
610
  msgid "Proceed Step 2"
611
  msgstr ""
612
 
613
- #: ../lib/yasr-ajax-functions.php:530
614
  msgid "Something goes wrong! Refresh the page and try again!"
615
  msgstr ""
616
 
617
- #: ../lib/yasr-ajax-functions.php:559
618
  msgid "I've found multiple set! Importing..."
619
  msgstr ""
620
 
621
- #: ../lib/yasr-ajax-functions.php:568
622
  msgid "Multi set's name has been successfull imported."
623
  msgstr ""
624
 
625
- #: ../lib/yasr-ajax-functions.php:570
626
  msgid "Now I'm going to import multi set data"
627
  msgstr ""
628
 
629
- #: ../lib/yasr-ajax-functions.php:581
630
  msgid "All votes has been successfull imported."
631
  msgstr ""
632
 
633
- #: ../lib/yasr-ajax-functions.php:584
634
  msgid "Done"
635
  msgstr ""
636
 
637
- #: ../lib/yasr-ajax-functions.php:589
638
  msgid "I've found multiple set votes but I couldn't insert into db"
639
  msgstr ""
640
 
641
- #: ../lib/yasr-ajax-functions.php:597
642
  msgid "I've found multi set but with no data"
643
  msgstr ""
644
 
645
- #: ../lib/yasr-ajax-functions.php:606
646
  msgid "I've found multi set name but I couldn't insert into db"
647
  msgstr ""
648
 
649
- #: ../lib/yasr-ajax-functions.php:614
650
  msgid "Multiset was not found. Imported is done!"
651
  msgstr ""
652
 
653
- #: ../lib/yasr-ajax-functions.php:880 ../lib/yasr-ajax-functions.php:885
654
  msgid "Vote Saved"
655
  msgstr ""
656
 
657
- #: ../lib/yasr-ajax-functions.php:880 ../lib/yasr-ajax-functions.php:916
658
- #: ../lib/yasr-ajax-functions.php:923
659
- msgid "votes casts"
660
- msgstr ""
661
-
662
- #: ../lib/yasr-ajax-functions.php:885
663
- msgid "vote cast"
664
  msgstr ""
665
 
666
- #: ../lib/yasr-ajax-functions.php:1043
667
- msgid ""
668
- "You don't have any user votes stored, or they're not enought. In order to "
669
- "appear in this chart, post must have at least 2 votes. Post whith less than "
670
- "2 vote are ignored"
671
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: YASR lenguages\n"
4
+ "POT-Creation-Date: 2014-08-02 14:13+0100\n"
5
+ "PO-Revision-Date: 2014-08-02 14:13+0100\n"
6
  "Last-Translator: Dario <thedudoworld@gmail.com>\n"
7
+ "Language-Team: \n"
8
+ "Language: En\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-SearchPath-0: ..\n"
16
+ "X-Poedit-SearchPath-1: ../lib\n"
17
 
18
+ #: ../yasr-settings-page.php:6 ../lib/yasr-functions.php:64
19
  #: ../lib/yasr-ajax-functions.php:29 ../lib/yasr-ajax-functions.php:89
20
+ #: ../lib/yasr-ajax-functions.php:228 ../lib/yasr-ajax-functions.php:753
21
  msgid "You do not have sufficient permissions to access this page."
22
  msgstr ""
23
 
130
  msgstr ""
131
 
132
  #: ../yasr-metabox-multiple-rating.php:26
133
+ #: ../lib/yasr-settings-functions.php:370
134
  msgid "Select"
135
  msgstr ""
136
 
137
+ #: ../yasr-metabox-overall-rating.php:17
138
  msgid "Rate this article / item"
139
  msgstr ""
140
 
141
+ #: ../yasr-metabox-overall-rating.php:25
142
+ #: ../lib/yasr-shortcode-functions.php:125 ../lib/yasr-functions.php:242
143
  msgid "Loading, please wait"
144
  msgstr ""
145
 
146
+ #: ../lib/yasr-shortcode-functions.php:156
147
+ #: ../lib/yasr-shortcode-functions.php:168
148
+ #: ../lib/yasr-shortcode-functions.php:173
149
  #: ../lib/yasr-shortcode-functions.php:186
150
+ #: ../lib/yasr-shortcode-functions.php:191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  #: ../lib/yasr-shortcode-functions.php:212
152
+ #: ../lib/yasr-shortcode-functions.php:221
153
+ #: ../lib/yasr-shortcode-functions.php:227
154
+ #: ../lib/yasr-shortcode-functions.php:241
155
+ #: ../lib/yasr-shortcode-functions.php:247
156
+ #: ../lib/yasr-shortcode-functions.php:272
157
+ #: ../lib/yasr-shortcode-functions.php:284
158
+ #: ../lib/yasr-shortcode-functions.php:289
159
+ #: ../lib/yasr-shortcode-functions.php:302
160
+ #: ../lib/yasr-shortcode-functions.php:307
161
+ #: ../lib/yasr-shortcode-functions.php:328
162
+ #: ../lib/yasr-shortcode-functions.php:337
163
+ #: ../lib/yasr-shortcode-functions.php:343
164
+ #: ../lib/yasr-shortcode-functions.php:357
165
+ #: ../lib/yasr-shortcode-functions.php:363
166
+ #: ../lib/yasr-shortcode-functions.php:388
167
+ #: ../lib/yasr-shortcode-functions.php:400
168
+ #: ../lib/yasr-shortcode-functions.php:405
169
+ #: ../lib/yasr-shortcode-functions.php:418
170
+ #: ../lib/yasr-shortcode-functions.php:423
171
+ #: ../lib/yasr-shortcode-functions.php:444
172
+ #: ../lib/yasr-shortcode-functions.php:453
173
+ #: ../lib/yasr-shortcode-functions.php:459
174
+ #: ../lib/yasr-shortcode-functions.php:473
175
+ #: ../lib/yasr-shortcode-functions.php:479 ../lib/yasr-ajax-functions.php:987
176
+ #: ../lib/yasr-ajax-functions.php:993 ../lib/yasr-ajax-functions.php:1024
177
+ #: ../lib/yasr-ajax-functions.php:1032
178
+ msgid "Total: "
179
  msgstr ""
180
 
181
+ #: ../lib/yasr-shortcode-functions.php:242
182
+ #: ../lib/yasr-shortcode-functions.php:358
183
+ #: ../lib/yasr-shortcode-functions.php:474 ../lib/yasr-functions.php:347
184
+ #: ../lib/yasr-functions.php:352 ../lib/yasr-functions.php:463
185
+ #: ../lib/yasr-functions.php:468 ../lib/yasr-functions.php:579
186
+ #: ../lib/yasr-functions.php:584
187
+ msgid "You must sign to vote"
188
  msgstr ""
189
 
190
+ #: ../lib/yasr-shortcode-functions.php:669
191
+ msgid "Rating"
 
192
  msgstr ""
193
 
194
+ #: ../lib/yasr-shortcode-functions.php:683
195
+ msgid "You don't have any votes stored"
 
196
  msgstr ""
197
 
198
+ #: ../lib/yasr-shortcode-functions.php:799
199
  msgid "You don't have any user votes stored"
200
  msgstr ""
201
 
202
+ #: ../lib/yasr-shortcode-functions.php:868
203
  msgid ""
204
  "Problem while retriving the top 5 most active reviewers. Did you published "
205
  "any review?"
206
  msgstr ""
207
 
208
+ #: ../lib/yasr-shortcode-functions.php:936
209
  msgid ""
210
  "Problem while retriving the top 10 active users chart. Are you sure you have "
211
  "votes to show?"
212
  msgstr ""
213
 
214
+ #: ../lib/yasr-settings-functions.php:31
215
  msgid "General settings"
216
  msgstr ""
217
 
218
+ #: ../lib/yasr-settings-functions.php:32
219
+ msgid "Auto insert options"
220
  msgstr ""
221
 
222
+ #: ../lib/yasr-settings-functions.php:33
223
  msgid "Show overall rating in Home Page?"
224
  msgstr ""
225
 
226
+ #: ../lib/yasr-settings-functions.php:34
227
  msgid "Insert custom text to show before / after stars"
228
  msgstr ""
229
 
230
+ #: ../lib/yasr-settings-functions.php:35
231
  msgid "Which color scheme do you want to use?"
232
  msgstr ""
233
 
234
+ #: ../lib/yasr-settings-functions.php:36
235
  msgid "Allow only logged in user to vote?"
236
  msgstr ""
237
 
238
+ #: ../lib/yasr-settings-functions.php:37
239
  msgid "Which rich snippets do you want to use?"
240
  msgstr ""
241
 
242
+ #: ../lib/yasr-settings-functions.php:51
243
  msgid "Use Auto Insert?"
244
  msgstr ""
245
 
246
+ #: ../lib/yasr-settings-functions.php:54
 
247
  #: ../lib/yasr-settings-functions.php:127
248
+ #: ../lib/yasr-settings-functions.php:147
249
+ #: ../lib/yasr-settings-functions.php:172
250
  msgid "Yes"
251
  msgstr ""
252
 
253
+ #: ../lib/yasr-settings-functions.php:72
 
254
  #: ../lib/yasr-settings-functions.php:132
255
+ #: ../lib/yasr-settings-functions.php:152
256
+ #: ../lib/yasr-settings-functions.php:189
257
  msgid "No"
258
  msgstr ""
259
 
260
+ #: ../lib/yasr-settings-functions.php:78
261
  msgid "What?"
262
  msgstr ""
263
 
264
+ #: ../lib/yasr-settings-functions.php:81
265
  msgid "Overall Rating / Author Rating"
266
  msgstr ""
267
 
268
+ #: ../lib/yasr-settings-functions.php:85 ../lib/yasr-ajax-functions.php:355
269
  msgid "Visitor Votes"
270
  msgstr ""
271
 
272
+ #: ../lib/yasr-settings-functions.php:89
273
  msgid "Both"
274
  msgstr ""
275
 
276
+ #: ../lib/yasr-settings-functions.php:93
277
  msgid "Where?"
278
  msgstr ""
279
 
280
+ #: ../lib/yasr-settings-functions.php:96
281
  msgid "Before the post"
282
  msgstr ""
283
 
284
+ #: ../lib/yasr-settings-functions.php:100
285
  msgid "After the post"
286
  msgstr ""
287
 
288
+ #: ../lib/yasr-settings-functions.php:105
289
+ msgid "Size"
290
+ msgstr ""
291
+
292
+ #: ../lib/yasr-settings-functions.php:109
293
+ msgid "Small"
294
+ msgstr ""
295
+
296
+ #: ../lib/yasr-settings-functions.php:114
297
+ msgid "Medium"
298
+ msgstr ""
299
+
300
+ #: ../lib/yasr-settings-functions.php:119
301
+ msgid "Large"
302
+ msgstr ""
303
+
304
+ #: ../lib/yasr-settings-functions.php:124
305
  msgid "Exclude Pages?"
306
  msgstr ""
307
 
308
+ #: ../lib/yasr-settings-functions.php:156
309
  msgid ""
310
  "If you enable this, \"Overall Rating\" will be showed not only in the single "
311
  "article or page, but also in pages like Home Page, category pages or "
312
  "archives."
313
  msgstr ""
314
 
315
+ #: ../lib/yasr-settings-functions.php:196
316
  msgid "Custom text to display before overall rating"
317
  msgstr ""
318
 
319
+ #: ../lib/yasr-settings-functions.php:201
320
  msgid "Custom text to display before visitor rating"
321
  msgstr ""
322
 
323
+ #: ../lib/yasr-settings-functions.php:206
324
  msgid "Custom text to display when a non logged user has already rated"
325
  msgstr ""
326
 
327
+ #: ../lib/yasr-settings-functions.php:222
328
  msgid "Light"
329
  msgstr ""
330
 
331
+ #: ../lib/yasr-settings-functions.php:227
332
  msgid "Dark"
333
  msgstr ""
334
 
335
+ #: ../lib/yasr-settings-functions.php:232
336
  msgid "Preview"
337
  msgstr ""
338
 
339
+ #: ../lib/yasr-settings-functions.php:237
340
  msgid "Light theme"
341
  msgstr ""
342
 
343
+ #: ../lib/yasr-settings-functions.php:242
344
  msgid "Dark Theme"
345
  msgstr ""
346
 
347
+ #: ../lib/yasr-settings-functions.php:260
348
  msgid "Allow only logged-in users"
349
  msgstr ""
350
 
351
+ #: ../lib/yasr-settings-functions.php:264
352
  msgid "Allow everybody (logged in and anonymous)"
353
  msgstr ""
354
 
355
+ #: ../lib/yasr-settings-functions.php:281
356
  msgid "Review Rating"
357
  msgstr ""
358
 
359
+ #: ../lib/yasr-settings-functions.php:285
360
  msgid "Aggregate Rating"
361
  msgstr ""
362
 
363
+ #: ../lib/yasr-settings-functions.php:290
364
  msgid "What is this?"
365
  msgstr ""
366
 
367
+ #: ../lib/yasr-settings-functions.php:295
368
  msgid ""
369
  "If you select \"Review Rating\", your site will be indexed from search "
370
  "engines like this: "
371
  msgstr ""
372
 
373
+ #: ../lib/yasr-settings-functions.php:300
374
  msgid ""
375
  "If, instead, you choose \"Aggregate Rating\", your site will be indexed like "
376
  "this"
377
  msgstr ""
378
 
379
+ #: ../lib/yasr-settings-functions.php:316
380
  msgid ""
381
  "Field Name, Element#1 and Element#2 MUST be filled and must be long at least "
382
  "3 characters"
383
  msgstr ""
384
 
385
+ #: ../lib/yasr-settings-functions.php:319
386
  msgid "Name"
387
  msgstr ""
388
 
389
+ #: ../lib/yasr-settings-functions.php:324
390
  msgid "You can insert up to nine element"
391
  msgstr ""
392
 
393
+ #: ../lib/yasr-settings-functions.php:329
394
  msgid "Element "
395
  msgstr ""
396
 
397
+ #: ../lib/yasr-settings-functions.php:339
398
  msgid "Create New Set"
399
  msgstr ""
400
 
401
+ #: ../lib/yasr-settings-functions.php:362
402
  msgid "Wich set do you want to edit or remove?"
403
  msgstr ""
404
 
405
+ #: ../lib/yasr-settings-functions.php:402
406
+ #: ../lib/yasr-settings-functions.php:520
407
  msgid "Field name"
408
  msgstr ""
409
 
410
+ #: ../lib/yasr-settings-functions.php:406
411
+ #: ../lib/yasr-settings-functions.php:524
412
  msgid "Remove"
413
  msgstr ""
414
 
415
+ #: ../lib/yasr-settings-functions.php:461
416
+ #: ../lib/yasr-settings-functions.php:579
417
  msgid ""
418
  "If you remove something you will remove all the votes for that set or field. "
419
  "This operation CAN'T BE undone."
420
  msgstr ""
421
 
422
+ #: ../lib/yasr-settings-functions.php:468
423
+ #: ../lib/yasr-settings-functions.php:586
424
  msgid "You can use up to 9 elements"
425
  msgstr ""
426
 
427
+ #: ../lib/yasr-settings-functions.php:470
428
+ #: ../lib/yasr-settings-functions.php:588
429
  msgid "Add element"
430
  msgstr ""
431
 
432
+ #: ../lib/yasr-settings-functions.php:472
433
+ #: ../lib/yasr-settings-functions.php:590
434
  msgid "Save changes"
435
  msgstr ""
436
 
437
+ #: ../lib/yasr-settings-functions.php:482
438
  msgid "No multiple set were found"
439
  msgstr ""
440
 
441
+ #: ../lib/yasr-settings-functions.php:721
442
+ #: ../lib/yasr-settings-functions.php:976
443
  msgid "Settings Saved"
444
  msgstr ""
445
 
446
+ #: ../lib/yasr-settings-functions.php:726
447
  msgid "Something goes wrong trying insert set field name. Please report it"
448
  msgstr ""
449
 
450
+ #: ../lib/yasr-settings-functions.php:732
451
  msgid "Something goes wrong trying insert multi set name. Please report it"
452
  msgstr ""
453
 
454
+ #: ../lib/yasr-settings-functions.php:807
455
  msgid "Something goes wrong trying to delete a multi-set . Please report it"
456
  msgstr ""
457
 
458
+ #: ../lib/yasr-settings-functions.php:812
459
  msgid ""
460
  "Something goes wrong trying to delete data fields for a set. Please report it"
461
  msgstr ""
462
 
463
+ #: ../lib/yasr-settings-functions.php:850
464
  msgid ""
465
  "Something goes wrong trying to delete a multi-set element. Please report it"
466
  msgstr ""
467
 
468
+ #: ../lib/yasr-settings-functions.php:909
469
  msgid ""
470
  "Something goes wrong trying to update a multi set element. Please report it"
471
  msgstr ""
472
 
473
+ #: ../lib/yasr-settings-functions.php:961
474
  msgid ""
475
  "Something goes wrong trying to insert set field name in edit form. Please "
476
  "report it"
477
  msgstr ""
478
 
479
+ #: ../lib/yasr-settings-functions.php:1007
480
  msgid "No previous Gd Star Ratings installation was found"
481
  msgstr ""
482
 
483
+ #: ../lib/yasr-db-functions.php:214 ../lib/yasr-ajax-functions.php:765
484
  msgid "No Recenet votes yet"
485
  msgstr ""
486
 
487
+ #: ../lib/yasr-db-functions.php:229 ../lib/yasr-ajax-functions.php:778
488
  msgid "anonymous"
489
  msgstr ""
490
 
491
+ #: ../lib/yasr-db-functions.php:252 ../lib/yasr-ajax-functions.php:801
492
  msgid "Ip address"
493
  msgstr ""
494
 
495
+ #: ../lib/yasr-db-functions.php:293 ../lib/yasr-ajax-functions.php:842
496
  msgid "Pages"
497
  msgstr ""
498
 
499
+ #: ../lib/yasr-functions.php:53
500
  msgid "Yet Another Stars Rating: Settings"
501
  msgstr ""
502
 
503
+ #: ../lib/yasr-functions.php:83 ../lib/yasr-functions.php:90
504
  msgid "Overall Rating"
505
  msgstr ""
506
 
507
+ #: ../lib/yasr-functions.php:84
508
  msgid "Yet Another Stars Rating: Multiple set"
509
  msgstr ""
510
 
511
+ #: ../lib/yasr-functions.php:100
512
  msgid "You don't have enought privileges to insert overall rating"
513
  msgstr ""
514
 
515
+ #: ../lib/yasr-functions.php:110
516
  msgid "You don't have enought privileges to insert multi-set"
517
  msgstr ""
518
 
519
+ #: ../lib/yasr-functions.php:264 ../lib/yasr-functions.php:275
520
+ #: ../lib/yasr-functions.php:293 ../lib/yasr-functions.php:321
521
+ #: ../lib/yasr-functions.php:329 ../lib/yasr-functions.php:347
522
+ #: ../lib/yasr-functions.php:380 ../lib/yasr-functions.php:391
523
+ #: ../lib/yasr-functions.php:409 ../lib/yasr-functions.php:437
524
+ #: ../lib/yasr-functions.php:445 ../lib/yasr-functions.php:463
525
+ #: ../lib/yasr-functions.php:496 ../lib/yasr-functions.php:507
526
+ #: ../lib/yasr-functions.php:525 ../lib/yasr-functions.php:553
527
+ #: ../lib/yasr-functions.php:561 ../lib/yasr-functions.php:579
528
+ msgid "Average Rating"
529
+ msgstr ""
530
+
531
+ #: ../lib/yasr-functions.php:264 ../lib/yasr-functions.php:321
532
+ #: ../lib/yasr-functions.php:380 ../lib/yasr-functions.php:437
533
+ #: ../lib/yasr-functions.php:496 ../lib/yasr-functions.php:553
534
+ msgid "User "
535
+ msgstr ""
536
+
537
+ #: ../lib/yasr-functions.php:280 ../lib/yasr-functions.php:298
538
+ #: ../lib/yasr-functions.php:334 ../lib/yasr-functions.php:352
539
+ #: ../lib/yasr-functions.php:396 ../lib/yasr-functions.php:414
540
+ #: ../lib/yasr-functions.php:450 ../lib/yasr-functions.php:468
541
+ #: ../lib/yasr-functions.php:512 ../lib/yasr-functions.php:530
542
+ #: ../lib/yasr-functions.php:566 ../lib/yasr-functions.php:584
543
+ msgid "No rating yet"
544
+ msgstr ""
545
+
546
+ #: ../lib/yasr-functions.php:789
547
  msgid " reviewed by "
548
  msgstr ""
549
 
550
+ #: ../lib/yasr-functions.php:790
551
  msgid " on "
552
  msgstr ""
553
 
554
+ #: ../lib/yasr-functions.php:791 ../lib/yasr-functions.php:822
555
  msgid " rated "
556
  msgstr ""
557
 
558
+ #: ../lib/yasr-functions.php:791
559
  msgid " on 5.0"
560
  msgstr ""
561
 
562
+ #: ../lib/yasr-functions.php:822
563
  msgid " out of "
564
  msgstr ""
565
 
566
+ #: ../lib/yasr-functions.php:823
567
  msgid " based on "
568
  msgstr ""
569
 
570
+ #: ../lib/yasr-functions.php:823
571
  msgid " user ratings"
572
  msgstr ""
573
 
587
  msgid "Choose a vote for every element"
588
  msgstr ""
589
 
590
+ #: ../lib/yasr-ajax-functions.php:337
591
  msgid "Overall Rating / Review"
592
  msgstr ""
593
 
594
+ #: ../lib/yasr-ajax-functions.php:340
595
  msgid "Insert Overall Rating / Review for this post"
596
  msgstr ""
597
 
598
+ #: ../lib/yasr-ajax-functions.php:343 ../lib/yasr-ajax-functions.php:361
599
+ msgid "Choose Size"
600
+ msgstr ""
601
+
602
+ #: ../lib/yasr-ajax-functions.php:358
603
  msgid "Insert the ability for your visitor to vote"
604
  msgstr ""
605
 
606
+ #: ../lib/yasr-ajax-functions.php:375
607
  msgid "If you want to insert a multi-set, pick one:"
608
  msgstr ""
609
 
610
+ #: ../lib/yasr-ajax-functions.php:381
611
  msgid "Choose wich set you want to insert."
612
  msgstr ""
613
 
614
+ #: ../lib/yasr-ajax-functions.php:389
615
  msgid "Insert Multiset:"
616
  msgstr ""
617
 
618
+ #: ../lib/yasr-ajax-functions.php:408
619
  msgid "Top 10 overall ratings"
620
  msgstr ""
621
 
622
+ #: ../lib/yasr-ajax-functions.php:410
623
  msgid "Insert Top 10 highest rated by post author"
624
  msgstr ""
625
 
626
+ #: ../lib/yasr-ajax-functions.php:414
627
  msgid "Top 10 by visitors"
628
  msgstr ""
629
 
630
+ #: ../lib/yasr-ajax-functions.php:416
631
  msgid "Insert Top 10 most or higher rated posts from visitors"
632
  msgstr ""
633
 
634
+ #: ../lib/yasr-ajax-functions.php:420
635
  msgid "Most active reviewers"
636
  msgstr ""
637
 
638
+ #: ../lib/yasr-ajax-functions.php:422
639
  msgid "Insert Top 5 active reviewers"
640
  msgstr ""
641
 
642
+ #: ../lib/yasr-ajax-functions.php:426
643
  msgid "Most active users"
644
  msgstr ""
645
 
646
+ #: ../lib/yasr-ajax-functions.php:428
647
  msgid "Insert Top 10 active users in visitor ratings"
648
  msgstr ""
649
 
650
+ #: ../lib/yasr-ajax-functions.php:622
651
  msgid "Reviews and visitor votes have been successfull imported."
652
  msgstr ""
653
 
654
+ #: ../lib/yasr-ajax-functions.php:628
655
  msgid ""
656
  "Step2: I will check if you used multiple set and if so I will import it. "
657
  "THIS MAY TAKE A WHILE!"
658
  msgstr ""
659
 
660
+ #: ../lib/yasr-ajax-functions.php:630
661
  msgid "Proceed Step 2"
662
  msgstr ""
663
 
664
+ #: ../lib/yasr-ajax-functions.php:637
665
  msgid "Something goes wrong! Refresh the page and try again!"
666
  msgstr ""
667
 
668
+ #: ../lib/yasr-ajax-functions.php:666
669
  msgid "I've found multiple set! Importing..."
670
  msgstr ""
671
 
672
+ #: ../lib/yasr-ajax-functions.php:675
673
  msgid "Multi set's name has been successfull imported."
674
  msgstr ""
675
 
676
+ #: ../lib/yasr-ajax-functions.php:677
677
  msgid "Now I'm going to import multi set data"
678
  msgstr ""
679
 
680
+ #: ../lib/yasr-ajax-functions.php:688
681
  msgid "All votes has been successfull imported."
682
  msgstr ""
683
 
684
+ #: ../lib/yasr-ajax-functions.php:691
685
  msgid "Done"
686
  msgstr ""
687
 
688
+ #: ../lib/yasr-ajax-functions.php:696
689
  msgid "I've found multiple set votes but I couldn't insert into db"
690
  msgstr ""
691
 
692
+ #: ../lib/yasr-ajax-functions.php:704
693
  msgid "I've found multi set but with no data"
694
  msgstr ""
695
 
696
+ #: ../lib/yasr-ajax-functions.php:713
697
  msgid "I've found multi set name but I couldn't insert into db"
698
  msgstr ""
699
 
700
+ #: ../lib/yasr-ajax-functions.php:721
701
  msgid "Multiset was not found. Imported is done!"
702
  msgstr ""
703
 
704
+ #: ../lib/yasr-ajax-functions.php:988 ../lib/yasr-ajax-functions.php:994
705
  msgid "Vote Saved"
706
  msgstr ""
707
 
708
+ #: ../lib/yasr-ajax-functions.php:1091 ../lib/yasr-ajax-functions.php:1126
709
+ msgid "Total:"
 
 
 
 
 
710
  msgstr ""
711
 
712
+ #: ../lib/yasr-ajax-functions.php:1091 ../lib/yasr-ajax-functions.php:1126
713
+ msgid "Average"
 
 
 
714
  msgstr ""
lib/yasr-ajax-functions.php CHANGED
@@ -984,13 +984,13 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
984
  $total_rating = ($user_votes_sum / $number_of_votes);
985
  $medium_rating=round ($total_rating, 1);
986
  echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$total_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
987
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$number_of_votes &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
988
  <strong>" . __("Vote Saved" , "yasr") . "</strong>";
989
  }
990
 
991
  elseif ($new_row_result) {
992
  echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
993
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$number_of_votes &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
994
  <strong>". __("Vote Saved" , "yasr");
995
  }
996
 
@@ -1021,7 +1021,7 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
1021
  if( YASR_TEXT_BEFORE_STARS == 1 && YASR_CUSTOM_TEXT_USER_VOTED != '' ) {
1022
 
1023
  echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted_ro\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$average_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
1024
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$number_of_votes &nbsp; &nbsp;" . __("Average $average_rating/5" , "yasr") . "]</span>
1025
  <strong>" . YASR_CUSTOM_TEXT_USER_VOTED . " </strong>";
1026
 
1027
  }
@@ -1029,7 +1029,7 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
1029
  else {
1030
 
1031
  echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted_ro\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$average_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
1032
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$number_of_votes &nbsp; &nbsp;" . __("Average $average_rating/5" , "yasr") . "]</span>
1033
  <strong>" . __("You've already voted this article with $rating", "yasr") . "</strong>";
1034
 
1035
  }
@@ -1052,35 +1052,27 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
1052
 
1053
  global $wpdb;
1054
 
1055
- $chart_type = 'most'; //default value;
1056
-
1057
- if (isset($_POST['order_by'])) {
1058
-
1059
- $chart_type = $_POST['order_by'];
1060
-
1061
- if ($chart_type != 'most' && $chart_type != 'highest') {
1062
-
1063
- $chart_type = 'most';
1064
-
1065
- }
1066
-
1067
- }
1068
-
1069
- if ($chart_type === 'most' ) {
1070
-
1071
  $query_result_most_rated = $wpdb->get_results("SELECT post_id, number_of_votes, sum_votes
1072
  FROM " . YASR_VOTES_TABLE . ", $wpdb->posts AS p
1073
  WHERE post_id = p.ID
1074
  AND p.post_status = 'publish'
1075
  ORDER BY number_of_votes DESC, sum_votes DESC LIMIT 10");
1076
 
 
 
 
 
 
 
 
 
1077
  if ($query_result_most_rated) {
1078
 
1079
- echo ( "<table class=\"yasr-most-or-highest-rated-posts\">
1080
- <tr>
1081
- <th>Post / Page</th>
1082
- <th>Order By:&nbsp;&nbsp; <a href=\"#\" id=\"yasr_multi_chart_link_to_nothing\">Most Rated</a> | <a href=\"#\" id=\"yasr_multi_chart_highest\">Highest Rated</a></th>
1083
- </tr>"
1084
  );
1085
 
1086
  foreach ($query_result_most_rated as $result) {
@@ -1094,9 +1086,10 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
1094
  $link = get_permalink($result->post_id); //Get permalink from post it
1095
 
1096
  echo ( "<tr>
1097
- <td width=\"60%\"><a href=\"$link\">$post_title</a></td>
1098
- <td width=\"40%\"><div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
1099
- <br /> [" . __("Total:" , "yasr") . "$result->number_of_votes &nbsp;&nbsp;&nbsp;" . __("Average" , "yasr") . " $rating]</td>
 
1100
  </tr>"
1101
 
1102
  );
@@ -1108,25 +1101,14 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
1108
 
1109
  } //End if $query_result_most_rated)
1110
 
1111
- } // End if ($chart_type === 'most' )
1112
-
1113
- elseif ($chart_type ==='highest') {
1114
-
1115
- $query_result_highest = $wpdb->get_results("SELECT (sum_votes / number_of_votes) as result, post_id, number_of_votes
1116
- FROM " . YASR_VOTES_TABLE . ", $wpdb->posts AS p
1117
- WHERE post_id = p.ID
1118
- AND number_of_votes >= 2
1119
- AND p.post_status = 'publish'
1120
- ORDER BY result DESC, number_of_votes DESC LIMIT 10
1121
- ");
1122
-
1123
  if ($query_result_highest) {
1124
 
1125
- echo ( "<table class=\"yasr-most-or-highest-rated-posts\">
1126
- <tr>
1127
- <th>Post / Page</th>
1128
- <th>Order By:&nbsp;&nbsp; <a href=\"#\" id=\"yasr_multi_chart_most\">Most Rated</a> | <a href=\"#\" id=\"yasr_multi_chart_link_to_nothing\">Highest Rated</a></th>
1129
- </tr>"
1130
 
1131
  );
1132
 
@@ -1141,8 +1123,9 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
1141
  echo ("<tr>
1142
  <td width=\"60%\"><a href=\"$link\">$post_title</a></td>
1143
  <td width=\"40%\"><div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
1144
- <br /> [" . __("Total:" , "yasr") . "$result->number_of_votes &nbsp;&nbsp;&nbsp;" . __("Average" , "yasr") . " $rating]</td>
1145
- </tr>");
 
1146
 
1147
 
1148
  } //End foreach
@@ -1150,12 +1133,6 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
1150
  echo "</table>";
1151
 
1152
  } //end if $query_result
1153
-
1154
- else {
1155
- _e("You don't have any user votes stored, or they're not enought. In order to appear in this chart, post must have at least 2 votes. Post whith less than 2 vote are ignored", "yasr");
1156
- }
1157
-
1158
- } //End if ($chart_type ==='highest')
1159
 
1160
  die();
1161
 
984
  $total_rating = ($user_votes_sum / $number_of_votes);
985
  $medium_rating=round ($total_rating, 1);
986
  echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$total_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
987
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
988
  <strong>" . __("Vote Saved" , "yasr") . "</strong>";
989
  }
990
 
991
  elseif ($new_row_result) {
992
  echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
993
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
994
  <strong>". __("Vote Saved" , "yasr");
995
  }
996
 
1021
  if( YASR_TEXT_BEFORE_STARS == 1 && YASR_CUSTOM_TEXT_USER_VOTED != '' ) {
1022
 
1023
  echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted_ro\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$average_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
1024
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes &nbsp; &nbsp;" . __("Average $average_rating/5" , "yasr") . "]</span>
1025
  <strong>" . YASR_CUSTOM_TEXT_USER_VOTED . " </strong>";
1026
 
1027
  }
1029
  else {
1030
 
1031
  echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted_ro\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$average_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
1032
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes &nbsp; &nbsp;" . __("Average $average_rating/5" , "yasr") . "]</span>
1033
  <strong>" . __("You've already voted this article with $rating", "yasr") . "</strong>";
1034
 
1035
  }
1052
 
1053
  global $wpdb;
1054
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1055
  $query_result_most_rated = $wpdb->get_results("SELECT post_id, number_of_votes, sum_votes
1056
  FROM " . YASR_VOTES_TABLE . ", $wpdb->posts AS p
1057
  WHERE post_id = p.ID
1058
  AND p.post_status = 'publish'
1059
  ORDER BY number_of_votes DESC, sum_votes DESC LIMIT 10");
1060
 
1061
+ $query_result_highest = $wpdb->get_results("SELECT (sum_votes / number_of_votes) as result, post_id, number_of_votes
1062
+ FROM " . YASR_VOTES_TABLE . ", $wpdb->posts AS p
1063
+ WHERE post_id = p.ID
1064
+ AND number_of_votes >= 2
1065
+ AND p.post_status = 'publish'
1066
+ ORDER BY result DESC, number_of_votes DESC LIMIT 10
1067
+ ");
1068
+
1069
  if ($query_result_most_rated) {
1070
 
1071
+ echo ( "<table class=\"yasr-most-rated-posts\">
1072
+ <tr>
1073
+ <th>Post / Page</th>
1074
+ <th>Order By:&nbsp;&nbsp; <a href=\"#\" id=\"yasr_multi_chart_link_to_nothing\">Most Rated</a> | <a href=\"#\" id=\"yasr_multi_chart_highest\">Highest Rated</a></th>
1075
+ </tr>"
1076
  );
1077
 
1078
  foreach ($query_result_most_rated as $result) {
1086
  $link = get_permalink($result->post_id); //Get permalink from post it
1087
 
1088
  echo ( "<tr>
1089
+ <td width=\"60%\"><a href=\"$link\">$post_title</a></td>
1090
+ <td width=\"40%\"><div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
1091
+ <br /> [" . __("Total:" , "yasr") . "$result->number_of_votes &nbsp;&nbsp;&nbsp;" . __("Average" , "yasr") . " $rating]
1092
+ </td>
1093
  </tr>"
1094
 
1095
  );
1101
 
1102
  } //End if $query_result_most_rated)
1103
 
1104
+
 
 
 
 
 
 
 
 
 
 
 
1105
  if ($query_result_highest) {
1106
 
1107
+ echo ( "<table class=\"yasr-highest-rated-posts\">
1108
+ <tr>
1109
+ <th>Post / Page</th>
1110
+ <th>Order By:&nbsp;&nbsp; <a href=\"#\" id=\"yasr_multi_chart_most\">Most Rated</a> | <a href=\"#\" id=\"yasr_multi_chart_link_to_nothing\">Highest Rated</a></th>
1111
+ </tr>"
1112
 
1113
  );
1114
 
1123
  echo ("<tr>
1124
  <td width=\"60%\"><a href=\"$link\">$post_title</a></td>
1125
  <td width=\"40%\"><div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
1126
+ <br /> [" . __("Total:" , "yasr") . "$result->number_of_votes &nbsp;&nbsp;&nbsp;" . __("Average" , "yasr") . " $rating]
1127
+ </td>
1128
+ </tr>");
1129
 
1130
 
1131
  } //End foreach
1133
  echo "</table>";
1134
 
1135
  } //end if $query_result
 
 
 
 
 
 
1136
 
1137
  die();
1138
 
lib/yasr-shortcode-functions.php CHANGED
@@ -153,7 +153,7 @@ function shortcode_visitor_votes_callback ($atts) {
153
  if ($vote_if_user_already_rated) {
154
 
155
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
156
- <span class=\"yasr-total-average-text-small\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
157
  <strong><span class=\"yasr-visitor-shortcode-small-already-voted-text\">" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</span></strong></div>";
158
 
159
  }
@@ -165,12 +165,12 @@ function shortcode_visitor_votes_callback ($atts) {
165
 
166
  if ($votes_number>0) {
167
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
168
- <span class=\"yasr-total-average-text-small\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
169
  }
170
 
171
  else {
172
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
173
- <span class=\"yasr-total-average-text-small\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
174
  }
175
 
176
  } //End else
@@ -183,12 +183,12 @@ function shortcode_visitor_votes_callback ($atts) {
183
 
184
  if ($votes_number>0) {
185
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
186
- <span class=\"yasr-total-average-text-small\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
187
  }
188
 
189
  else {
190
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
191
- <span class=\"yasr-total-average-text-small\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
192
  }
193
 
194
  } //end else
@@ -209,7 +209,7 @@ function shortcode_visitor_votes_callback ($atts) {
209
  if ($vote_if_user_already_rated) {
210
 
211
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
212
- <span class=\"yasr-total-average-text-small\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
213
  <strong><span=\"class=\"yasr-visitor-shortcode-small-already-voted-text\">\">" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</span></strong></div>";
214
 
215
  }
@@ -218,13 +218,13 @@ function shortcode_visitor_votes_callback ($atts) {
218
 
219
  if ($votes_number>0) {
220
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
221
- <span class=\"yasr-total-average-text-small\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
222
  </div>";
223
  }
224
 
225
  else {
226
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
227
- <span class=\"yasr-total-average-text-small\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
228
  </div>";
229
  }
230
 
@@ -238,13 +238,13 @@ function shortcode_visitor_votes_callback ($atts) {
238
 
239
  if ($votes_number>0) {
240
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
241
- <span class=\"yasr-total-average-text-small\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
242
  " . __("You must sign to vote", "yasr") . "</div>";
243
  }
244
 
245
  else {
246
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
247
- <span class=\"yasr-total-average-text-small\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
248
  </div>";
249
  }
250
 
@@ -269,7 +269,7 @@ function shortcode_visitor_votes_callback ($atts) {
269
  if ($vote_if_user_already_rated) {
270
 
271
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
272
- <span class=\"yasr-total-average-text-medium\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
273
  <strong>" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
274
 
275
  }
@@ -281,12 +281,12 @@ function shortcode_visitor_votes_callback ($atts) {
281
 
282
  if ($votes_number>0) {
283
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
284
- <span class=\"yasr-total-average-text-medium\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
285
  }
286
 
287
  else {
288
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
289
- <span class=\"yasr-total-average-text-medium\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
290
  }
291
 
292
  } //End else
@@ -299,12 +299,12 @@ function shortcode_visitor_votes_callback ($atts) {
299
 
300
  if ($votes_number>0) {
301
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
302
- <span class=\"yasr-total-average-text-medium\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
303
  }
304
 
305
  else {
306
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
307
- <span class=\"yasr-total-average-text-medium\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
308
  }
309
 
310
  } //end else
@@ -325,7 +325,7 @@ function shortcode_visitor_votes_callback ($atts) {
325
  if ($vote_if_user_already_rated) {
326
 
327
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
328
- <span class=\"yasr-total-average-text-medium\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
329
  <strong>" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
330
 
331
  }
@@ -334,13 +334,13 @@ function shortcode_visitor_votes_callback ($atts) {
334
 
335
  if ($votes_number>0) {
336
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
337
- <span class=\"yasr-total-average-text-medium\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
338
  </div>";
339
  }
340
 
341
  else {
342
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
343
- <span class=\"yasr-total-average-text-medium\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
344
  </div>";
345
  }
346
 
@@ -354,13 +354,13 @@ function shortcode_visitor_votes_callback ($atts) {
354
 
355
  if ($votes_number>0) {
356
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
357
- <span class=\"yasr-total-average-text-medium\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
358
  " . __("You must sign to vote", "yasr") . "</div>";
359
  }
360
 
361
  else {
362
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
363
- <span class=\"yasr-total-average-text-medium\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
364
  </div>";
365
  }
366
 
@@ -385,7 +385,7 @@ function shortcode_visitor_votes_callback ($atts) {
385
  if ($vote_if_user_already_rated) {
386
 
387
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit bigstars\" id=\"yasr_rateit_visitor_votes_logged_rated\" 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\"></div>
388
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
389
  <strong>" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
390
 
391
  }
@@ -397,12 +397,12 @@ function shortcode_visitor_votes_callback ($atts) {
397
 
398
  if ($votes_number>0) {
399
  $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=\"false\"></div>
400
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
401
  }
402
 
403
  else {
404
  $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=\"false\"></div>
405
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
406
  }
407
 
408
  } //End else
@@ -415,12 +415,12 @@ function shortcode_visitor_votes_callback ($atts) {
415
 
416
  if ($votes_number>0) {
417
  $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=\"false\"></div>
418
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
419
  }
420
 
421
  else {
422
  $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=\"false\"></div>
423
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
424
  }
425
 
426
  } //end else
@@ -441,7 +441,7 @@ function shortcode_visitor_votes_callback ($atts) {
441
  if ($vote_if_user_already_rated) {
442
 
443
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit bigstars\" id=\"yasr_rateit_visitor_votes_logged_rated\" 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\"></div>
444
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
445
  <strong>" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
446
 
447
  }
@@ -450,13 +450,13 @@ function shortcode_visitor_votes_callback ($atts) {
450
 
451
  if ($votes_number>0) {
452
  $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=\"false\"></div>
453
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
454
  </div>";
455
  }
456
 
457
  else {
458
  $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=\"false\"></div>
459
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
460
  </div>";
461
  }
462
 
@@ -470,13 +470,13 @@ function shortcode_visitor_votes_callback ($atts) {
470
 
471
  if ($votes_number>0) {
472
  $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\"></div>
473
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
474
  " . __("You must sign to vote", "yasr") . "</div>";
475
  }
476
 
477
  else {
478
  $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\"></div>
479
- <span class=\"yasr-total-average-text\"> " . __("[Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
480
  </div>";
481
  }
482
 
@@ -664,7 +664,10 @@ function yasr_top_ten_highest_rated_callback () {
664
 
665
  $shortcode_html .= "<tr>
666
  <td width=\"60%\"><a href=\"$link\">$post_title</a></td>
667
- <td width=\"40%\"><div class=\"rateit medium\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$result->overall_rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div></td>
 
 
 
668
  </tr>";
669
 
670
 
@@ -717,12 +720,7 @@ function yasr_most_or_highest_rated_posts_callback () {
717
 
718
  if ($query_result_most_rated) {
719
 
720
- $shortcode_html = "<div class=\"yasr_multi_chart_container\"><table class=\"yasr-most-or-highest-rated-posts\">
721
- <tr>
722
- <th>Post / Page</th>
723
- <th>Order By:&nbsp;&nbsp; <a href=\"#\" id=\"yasr_multi_chart_link_to_nothing\">Most Rated</a> | <a href=\"#\" id=\"yasr_multi_chart_highest\">Highest Rated</a></th>
724
- </tr>
725
- </div>";
726
 
727
  foreach ($query_result_most_rated as $result) {
728
 
@@ -734,17 +732,8 @@ function yasr_most_or_highest_rated_posts_callback () {
734
 
735
  $link = get_permalink($result->post_id); //Get permalink from post it
736
 
737
- $shortcode_html .= "<tr>
738
- <td width=\"60%\"><a href=\"$link\">$post_title</a></td>
739
- <td width=\"40%\"><div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
740
- <br /> [" . __("Total:" , "yasr") . "$result->number_of_votes &nbsp;&nbsp;&nbsp;" . __("Average" , "yasr") . " $rating]</td>
741
- </tr>";
742
-
743
-
744
  } //End foreach
745
 
746
- $shortcode_html .= "</table>";
747
-
748
  ?>
749
 
750
  <script>
@@ -758,59 +747,37 @@ function yasr_most_or_highest_rated_posts_callback () {
758
 
759
  });
760
 
761
- var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
762
-
763
- //This send an ajax request to show the highest rated:
764
- //THIS WORK ONLY ON FIRST PAGE LOAD.
765
- jQuery('#yasr_multi_chart_highest').on("click", function () {
766
-
767
- var data = {
768
- order_by: 'highest',
769
  action : 'yasr_multi_chart_most_highest' //declared in yasr-ajax-functions
770
  };
771
 
772
- jQuery.post(ajaxurl, data, function(response) {
773
- jQuery('.yasr_multi_chart_container').html(response);
774
- jQuery('.rateit').rateit();
775
- });
776
-
777
- return false; // prevent default click action from happening!
778
 
779
- });
780
 
 
 
781
 
782
- jQuery(document).ajaxComplete(function() {
 
783
 
784
- //This send an ajax request to show the highest rated.
785
- //I need this again to make it work after ajax has been called
786
  jQuery('#yasr_multi_chart_highest').on("click", function () {
787
 
788
- var data = {
789
- order_by: 'highest',
790
- action : 'yasr_multi_chart_most_highest' //declared in yasr-ajax-functions
791
- };
792
 
793
- jQuery.post(ajaxurl, data, function(response) {
794
- jQuery('.yasr_multi_chart_container').html(response);
795
- jQuery('.rateit').rateit();
796
- });
797
 
798
  return false; // prevent default click action from happening!
799
 
800
  });
801
 
802
- //This send an ajax to come back to most rated
803
  jQuery('#yasr_multi_chart_most').on("click", function () {
804
 
805
- var data = {
806
- order_by: 'most',
807
- action : 'yasr_multi_chart_most_highest' //declared in yasr-ajax-functions
808
- };
809
 
810
- jQuery.post(ajaxurl, data, function(response) {
811
- jQuery('.yasr_multi_chart_container').html(response);
812
- jQuery('.rateit').rateit();
813
- });
814
 
815
  return false; // prevent default click action from happening!
816
 
153
  if ($vote_if_user_already_rated) {
154
 
155
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
156
+ <span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
157
  <strong><span class=\"yasr-visitor-shortcode-small-already-voted-text\">" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</span></strong></div>";
158
 
159
  }
165
 
166
  if ($votes_number>0) {
167
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
168
+ <span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
169
  }
170
 
171
  else {
172
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
173
+ <span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
174
  }
175
 
176
  } //End else
183
 
184
  if ($votes_number>0) {
185
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
186
+ <span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
187
  }
188
 
189
  else {
190
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
191
+ <span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
192
  }
193
 
194
  } //end else
209
  if ($vote_if_user_already_rated) {
210
 
211
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
212
+ <span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
213
  <strong><span=\"class=\"yasr-visitor-shortcode-small-already-voted-text\">\">" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</span></strong></div>";
214
 
215
  }
218
 
219
  if ($votes_number>0) {
220
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
221
+ <span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
222
  </div>";
223
  }
224
 
225
  else {
226
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
227
+ <span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
228
  </div>";
229
  }
230
 
238
 
239
  if ($votes_number>0) {
240
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
241
+ <span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
242
  " . __("You must sign to vote", "yasr") . "</div>";
243
  }
244
 
245
  else {
246
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
247
+ <span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
248
  </div>";
249
  }
250
 
269
  if ($vote_if_user_already_rated) {
270
 
271
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
272
+ <span class=\"yasr-total-average-text-medium\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
273
  <strong>" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
274
 
275
  }
281
 
282
  if ($votes_number>0) {
283
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
284
+ <span class=\"yasr-total-average-text-medium\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
285
  }
286
 
287
  else {
288
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
289
+ <span class=\"yasr-total-average-text-medium\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
290
  }
291
 
292
  } //End else
299
 
300
  if ($votes_number>0) {
301
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
302
+ <span class=\"yasr-total-average-text-medium\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
303
  }
304
 
305
  else {
306
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
307
+ <span class=\"yasr-total-average-text-medium\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
308
  }
309
 
310
  } //end else
325
  if ($vote_if_user_already_rated) {
326
 
327
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
328
+ <span class=\"yasr-total-average-text-medium\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
329
  <strong>" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
330
 
331
  }
334
 
335
  if ($votes_number>0) {
336
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
337
+ <span class=\"yasr-total-average-text-medium\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
338
  </div>";
339
  }
340
 
341
  else {
342
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
343
+ <span class=\"yasr-total-average-text-medium\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
344
  </div>";
345
  }
346
 
354
 
355
  if ($votes_number>0) {
356
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
357
+ <span class=\"yasr-total-average-text-medium\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
358
  " . __("You must sign to vote", "yasr") . "</div>";
359
  }
360
 
361
  else {
362
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit medium\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
363
+ <span class=\"yasr-total-average-text-medium\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
364
  </div>";
365
  }
366
 
385
  if ($vote_if_user_already_rated) {
386
 
387
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit bigstars\" id=\"yasr_rateit_visitor_votes_logged_rated\" 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\"></div>
388
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
389
  <strong>" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
390
 
391
  }
397
 
398
  if ($votes_number>0) {
399
  $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=\"false\"></div>
400
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
401
  }
402
 
403
  else {
404
  $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=\"false\"></div>
405
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
406
  }
407
 
408
  } //End else
415
 
416
  if ($votes_number>0) {
417
  $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=\"false\"></div>
418
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
419
  }
420
 
421
  else {
422
  $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=\"false\"></div>
423
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
424
  }
425
 
426
  } //end else
441
  if ($vote_if_user_already_rated) {
442
 
443
  $shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit bigstars\" id=\"yasr_rateit_visitor_votes_logged_rated\" 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\"></div>
444
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
445
  <strong>" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
446
 
447
  }
450
 
451
  if ($votes_number>0) {
452
  $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=\"false\"></div>
453
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
454
  </div>";
455
  }
456
 
457
  else {
458
  $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=\"false\"></div>
459
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
460
  </div>";
461
  }
462
 
470
 
471
  if ($votes_number>0) {
472
  $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\"></div>
473
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
474
  " . __("You must sign to vote", "yasr") . "</div>";
475
  }
476
 
477
  else {
478
  $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\"></div>
479
+ <span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$votes_number &nbsp; &nbsp;" . __("Average $medium_rating/5" , "yasr") . "]</span>
480
  </div>";
481
  }
482
 
664
 
665
  $shortcode_html .= "<tr>
666
  <td width=\"60%\"><a href=\"$link\">$post_title</a></td>
667
+ <td width=\"40%\">
668
+ <div class=\"rateit medium\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$result->overall_rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
669
+ <span class=\"yasr-highest-rated-text\">" . __("Rating", "yasr") . " $result->overall_rating </span>
670
+ </td>
671
  </tr>";
672
 
673
 
720
 
721
  if ($query_result_most_rated) {
722
 
723
+ $shortcode_html = "<div class=\"yasr-most-or-highest-rated-posts\" ></div>";
 
 
 
 
 
724
 
725
  foreach ($query_result_most_rated as $result) {
726
 
732
 
733
  $link = get_permalink($result->post_id); //Get permalink from post it
734
 
 
 
 
 
 
 
 
735
  } //End foreach
736
 
 
 
737
  ?>
738
 
739
  <script>
747
 
748
  });
749
 
750
+ var data = {
 
 
 
 
 
 
 
751
  action : 'yasr_multi_chart_most_highest' //declared in yasr-ajax-functions
752
  };
753
 
754
+ var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
 
 
 
 
 
755
 
756
+ jQuery.post(ajaxurl, data, function(response) {
757
 
758
+ jQuery('.yasr-most-or-highest-rated-posts').html(response);
759
+ jQuery('.rateit').rateit();
760
 
761
+ //By default, hide the highest rated chart
762
+ jQuery('.yasr-highest-rated-posts').hide();
763
 
764
+ //On click on highest, hide most and show highest
 
765
  jQuery('#yasr_multi_chart_highest').on("click", function () {
766
 
767
+ jQuery('.yasr-most-rated-posts').hide();
 
 
 
768
 
769
+ jQuery('.yasr-highest-rated-posts').show();
 
 
 
770
 
771
  return false; // prevent default click action from happening!
772
 
773
  });
774
 
775
+ //Vice versa
776
  jQuery('#yasr_multi_chart_most').on("click", function () {
777
 
778
+ jQuery('.yasr-highest-rated-posts').hide();
 
 
 
779
 
780
+ jQuery('.yasr-most-rated-posts').show();
 
 
 
781
 
782
  return false; // prevent default click action from happening!
783
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
3
  Tags: 5 star, admin, administrator, AJAX, five-star, javascript, jquery, post rating, posts, rate, rating, rating platform, rating system, ratings, review, reviews, rich snippets, seo, star, star rating, stars, vote, Votes, voting, voting contest, Schema, Schema.org, Serp
4
  Requires at least: 3.5
5
  Tested up to: 3.9.1
6
- Stable tag: 0.4.2
7
  License: GPL2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -76,6 +76,11 @@ Of course not: you can easily add it on the visual editor just by clicking on th
76
 
77
  == Changelog ==
78
 
 
 
 
 
 
79
  = 0.4.2 =
80
  * Fixed log table, last updated broke it
81
 
3
  Tags: 5 star, admin, administrator, AJAX, five-star, javascript, jquery, post rating, posts, rate, rating, rating platform, rating system, ratings, review, reviews, rich snippets, seo, star, star rating, stars, vote, Votes, voting, voting contest, Schema, Schema.org, Serp
4
  Requires at least: 3.5
5
  Tested up to: 3.9.1
6
+ Stable tag: 0.4.3
7
  License: GPL2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
76
 
77
  == Changelog ==
78
 
79
+ = 0.4.3 =
80
+ * Chart Top 10 by visitors have been rewritten. Now it's much much faster
81
+ * Added text on chart Top 10 overall ratings
82
+ * Minor changes
83
+
84
  = 0.4.2 =
85
  * Fixed log table, last updated broke it
86
 
yet-another-stars-rating.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Yet Another Stars Rating
4
  * Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
5
  * Description: Rating system with rich snippets
6
- * Version: 0.4.2
7
  * Author: Dario Curvino
8
  * Author URI: http://profiles.wordpress.org/dudo/
9
  * License: GPL2
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
28
  */
29
 
30
 
31
- define('YASR_VERSION_NUM', '0.4.2');
32
 
33
  //Plugin absolute path
34
  define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
@@ -83,6 +83,8 @@ define ("YASR_MULTI_SET_VALUES_TABLE", $wpdb->prefix . 'yasr_multi_values');
83
 
84
  define ("YASR_LOG_TABLE", $wpdb->prefix . 'yasr_log');
85
 
 
 
86
  // To remove in the end of August
87
  if ($version_installed && $version_installed < '0.3.4') {
88
 
3
  * Plugin Name: Yet Another Stars Rating
4
  * Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
5
  * Description: Rating system with rich snippets
6
+ * Version: 0.4.3
7
  * Author: Dario Curvino
8
  * Author URI: http://profiles.wordpress.org/dudo/
9
  * License: GPL2
28
  */
29
 
30
 
31
+ define('YASR_VERSION_NUM', '0.4.3');
32
 
33
  //Plugin absolute path
34
  define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
83
 
84
  define ("YASR_LOG_TABLE", $wpdb->prefix . 'yasr_log');
85
 
86
+ define ("YASR_LOADER_IMAGE", YASR_IMG_DIR . "/loader.gif");
87
+
88
  // To remove in the end of August
89
  if ($version_installed && $version_installed < '0.3.4') {
90