YOP Poll - Version 5.7.8

Version Description

  • Fixed issue with reset stats
  • Fixed security issue
  • Fixed issue with automatically reset stats
  • Fixed issue with custom loading image
  • Fixed display issues
  • Updated Get Code with more options
Download this release

Release Info

Developer yourownprogrammer
Plugin Icon 128x128 YOP Poll
Version 5.7.8
Comparing to
See all releases

Code changes from version 5.7.7 to 5.7.8

css/custombox.css ADDED
@@ -0,0 +1,872 @@
1
+ /*
2
+ ----------------------------
3
+ Actions
4
+ ----------------------------
5
+ */
6
+ .custombox-open,
7
+ .custombox-open body {
8
+ overflow: hidden;
9
+ }
10
+ .custombox-perspective,
11
+ .custombox-perspective body {
12
+ perspective: 600px;
13
+ height: 100%;
14
+ }
15
+ .custombox-overlay-open {
16
+ visibility: visible;
17
+ opacity: 1;
18
+ }
19
+
20
+ /*
21
+ ----------------------------
22
+ Defaults
23
+ ----------------------------
24
+ */
25
+ .custombox-overlay {
26
+ top: 0;
27
+ right: 0;
28
+ bottom: 0;
29
+ left: 0;
30
+ position: fixed;
31
+ transition-delay: 0s;
32
+ }
33
+ .custombox-overlay-default {
34
+ transition-timing-function: linear;
35
+ transition-property: opacity;
36
+ opacity: 0;
37
+ }
38
+ .custombox-modal-wrapper {
39
+ right: 0;
40
+ top: 0;
41
+ bottom: 0;
42
+ left: 0;
43
+ outline: 0 none;
44
+ overflow: auto;
45
+ position: fixed;
46
+ text-align: center;
47
+ }
48
+ .custombox-modal-container {
49
+ margin: 0 auto;
50
+ position: relative;
51
+ }
52
+ .custombox-modal img {
53
+ max-width: 100%;
54
+ height: auto;
55
+ }
56
+ .custombox-scrollbar {
57
+ position: absolute;
58
+ top: -9999px;
59
+ width: 50px;
60
+ height: 50px;
61
+ overflow: scroll;
62
+ }
63
+ .custombox-loading {
64
+ position: fixed;
65
+ transform: translateY(-50%) translateX(-50%);
66
+ top: 50%;
67
+ left: 50%;
68
+ }
69
+
70
+ /*
71
+ ----------------------------
72
+ Overlay: Letmein
73
+ ----------------------------
74
+ */
75
+ .custombox-overlay-letmein {
76
+ transition-property: all;
77
+ transition-timing-function: ease;
78
+ visibility: hidden;
79
+ }
80
+ .custombox-overlay-open.custombox-overlay-letmein {
81
+ transform: rotateX(-2deg);
82
+ transform-origin: 50% 0;
83
+ transform-style: preserve-3d;
84
+ visibility: visible;
85
+ opacity: 1;
86
+ }
87
+
88
+ /*
89
+ ----------------------------
90
+ Overlay: Slide together
91
+ ----------------------------
92
+ */
93
+ .custombox-overlay-slidetogether {
94
+ transform: translateY(-100%);
95
+ transition-property: transform ease-in-out;
96
+ }
97
+
98
+ .custombox-overlay-open.custombox-overlay-slidetogether {
99
+ transform: translateY(0);
100
+ transition-property: transform ease-in-out;
101
+ }
102
+
103
+ /*
104
+ ----------------------------
105
+ Overlay: Corner
106
+ ----------------------------
107
+ */
108
+ .custombox-overlay-corner {
109
+ transform: translateY(150px) translateX(150px);
110
+ transition-property: opacity, transform, visibility;
111
+ }
112
+ .custombox-overlay-open.custombox-overlay-corner {
113
+ transform: translateY(0);
114
+ transition-property: opacity, transform;
115
+ }
116
+
117
+ /*
118
+ ----------------------------
119
+ Overlay: Scale
120
+ ----------------------------
121
+ */
122
+ .custombox-overlay-scale {
123
+ transform: scale(0.9);
124
+ transition-property: transform;
125
+ }
126
+ .custombox-overlay-open.custombox-overlay-scale {
127
+ transform: scale(1);
128
+ transition-property: transform;
129
+ }
130
+
131
+ /*
132
+ ----------------------------
133
+ Overlay: Door
134
+ ----------------------------
135
+ */
136
+ .custombox-overlay-door {
137
+ visibility: hidden;
138
+ width: 0;
139
+ left: 50%;
140
+ transform: translateX(-50%);
141
+ transition-property: width ease-in-out;
142
+ }
143
+ .custombox-overlay-open.custombox-overlay-door {
144
+ visibility: visible;
145
+ width: 100%;
146
+ transition-property: width ease-in-out;
147
+ }
148
+
149
+ /*
150
+ ----------------------------
151
+ Overlay: Push
152
+ ----------------------------
153
+ */
154
+ .custombox-container-push {
155
+ overflow-x: hidden;
156
+ transition-property: transform;
157
+ }
158
+ .custombox-container-open.custombox-container-push {
159
+ transform: translateX(100%);
160
+ }
161
+ .custombox-overlay-push {
162
+ backface-visibility: hidden;
163
+ transform: translateX(-100%);
164
+ transition-property: transform ease-in-out;
165
+ }
166
+ .custombox-overlay-open.custombox-overlay-push {
167
+ transform: translateX(0);
168
+ transition-property: transform ease-in-out;
169
+ }
170
+
171
+ /*
172
+ ----------------------------
173
+ Overlay: Content Scale
174
+ ----------------------------
175
+ */
176
+ .custombox-open-contentscale body {
177
+ background-color: #DDD;
178
+ }
179
+ .custombox-container-contentscale {
180
+ transition: transform 0.5s;
181
+ overflow: hidden;
182
+ height: 100%;
183
+ }
184
+ .custombox-container-open.custombox-container-contentscale {
185
+ transform: scale(0.8);
186
+ }
187
+ .custombox-overlay-contentscale {
188
+ transform: translateY(100%);
189
+ transition-property: transform ease-in-out;
190
+ }
191
+ .custombox-overlay-open.custombox-overlay-contentscale {
192
+ transform: translateY(0);
193
+ transition-property: transform ease-in-out;
194
+ }
195
+
196
+ /*
197
+ ----------------------------
198
+ Overlay: Makeway
199
+ ----------------------------
200
+ */
201
+ .custombox-container-open.custombox-container-makeway {
202
+ height: 100%;
203
+ overflow: hidden;
204
+ }
205
+ .custombox-overlay-open.custombox-overlay-makeway {
206
+ transition-property: all;
207
+ }
208
+ .custombox-overlay-open.custombox-overlay-makeway,
209
+ .custombox-container-open.custombox-container-makeway {
210
+ transform-style: preserve-3d;
211
+ transform-origin: 0 50%;
212
+ animation: rotateRightSideFirst 0.5s forwards ease-in;
213
+ }
214
+ @keyframes rotateRightSideFirst {
215
+ 50% {
216
+ transform: translateZ(-50px) rotateY(5deg);
217
+ animation-timing-function: ease-out;
218
+ }
219
+ 100% {
220
+ transform: translateZ(-200px);
221
+ }
222
+ }
223
+
224
+ /*
225
+ ----------------------------
226
+ Overlay: Slip
227
+ ----------------------------
228
+ */
229
+ .custombox-overlay-open.custombox-overlay-slip {
230
+ transition-property: all;
231
+ }
232
+ .custombox-overlay-open.custombox-overlay-slip,
233
+ .custombox-container-open.custombox-container-slip {
234
+ transform-style: preserve-3d;
235
+ transform-origin: 50% 100%;
236
+ animation: OpenTop 0.5s forwards ease-in-out;
237
+ }
238
+ @keyframes OpenTop {
239
+ 50% {
240
+ transform: rotateX(10deg);
241
+ animation-timing-function: ease-out;
242
+ }
243
+ }
244
+
245
+ /*
246
+ ----------------------------
247
+ Modal: Fadein
248
+ ----------------------------
249
+ */
250
+ .custombox-modal-fadein {
251
+ transform: scale(0.7);
252
+ transition-property: all;
253
+ opacity: 0;
254
+ visibility: hidden;
255
+ }
256
+ .custombox-modal-open .custombox-modal-fadein {
257
+ transform: scale(1);
258
+ opacity: 1;
259
+ visibility: visible;
260
+ }
261
+
262
+ /*
263
+ ----------------------------
264
+ Modal: Slide
265
+ ----------------------------
266
+ */
267
+ .custombox-modal-container-slide > div,
268
+ .custombox-modal-container-slidetogether > div {
269
+ opacity: 0;
270
+ float: left;
271
+ }
272
+ .custombox-modal-open > .custombox-modal-container-slide > div,
273
+ .custombox-modal-open > .custombox-modal-container-slidetogether > div {
274
+ opacity: 1;
275
+ }
276
+
277
+ /*
278
+ ----------------------------
279
+ Modal: Slide from top
280
+ ----------------------------
281
+ */
282
+ .custombox-modal-slide-top {
283
+ transform: translateY(-300%);
284
+ }
285
+ .custombox-modal-open .custombox-modal-slide-top {
286
+ transform: translateY(0);
287
+ }
288
+
289
+ /*
290
+ ----------------------------
291
+ Modal: Slide from left
292
+ ----------------------------
293
+ */
294
+ .custombox-modal-slide-left {
295
+ transform: translateX(-300%);
296
+ }
297
+ .custombox-modal-open .custombox-modal-slide-left {
298
+ transform: translateX(0);
299
+ }
300
+
301
+ /*
302
+ ----------------------------
303
+ Modal: Slide from right
304
+ ----------------------------
305
+ */
306
+ .custombox-modal-slide-right {
307
+ transform: translateX(300%);
308
+ }
309
+ .custombox-modal-open .custombox-modal-slide-right {
310
+ transform: translateX(0);
311
+ }
312
+
313
+ /*
314
+ ----------------------------
315
+ Modal: Slide from bottom
316
+ ----------------------------
317
+ */
318
+ .custombox-modal-slide-bottom {
319
+ transform: translateY(300%);
320
+ }
321
+ .custombox-modal-open .custombox-modal-slide-bottom {
322
+ transform: translateY(0);
323
+ }
324
+
325
+ /*
326
+ ----------------------------
327
+ Modal: Newspaper
328
+ ----------------------------
329
+ */
330
+ .custombox-modal-newspaper {
331
+ transform: scale(0) rotate(720deg);
332
+ opacity: 0;
333
+ transition-property: all;
334
+ position: absolute;
335
+ }
336
+ .custombox-overlay-newspaper {
337
+ transition-property: all;
338
+ }
339
+ .custombox-modal-open .custombox-modal-newspaper {
340
+ transform: scale(1) rotate(0deg);
341
+ opacity: 1;
342
+ }
343
+
344
+ /*
345
+ ----------------------------
346
+ Modal: Fall
347
+ ----------------------------
348
+ */
349
+ .custombox-modal-container-fall {
350
+ perspective: 1300px;
351
+ }
352
+ .custombox-modal-fall {
353
+ transform-style: preserve-3d;
354
+ transform: translateZ(600px) rotateX(20deg);
355
+ opacity: 0;
356
+ }
357
+ .custombox-modal-open .custombox-modal-fall {
358
+ transition-timing-function: ease-in;
359
+ transition-property: all;
360
+ transform: translateZ(0) rotateX(0deg);
361
+ opacity: 1;
362
+ }
363
+
364
+ /*
365
+ ----------------------------
366
+ Modal: Sideball
367
+ ----------------------------
368
+ */
369
+ .custombox-modal-container-sidefall {
370
+ perspective: 1300px;
371
+ }
372
+ .custombox-modal-wrapper-sidefall {
373
+ overflow-x: hidden;
374
+ }
375
+ .custombox-modal-sidefall {
376
+ transform-style: preserve-3d;
377
+ transform: translate(30%) translateZ(600px) rotate(10deg);
378
+ opacity: 0;
379
+ }
380
+ .custombox-modal-open .custombox-modal-sidefall {
381
+ transition-timing-function: ease-in;
382
+ transition-property: all;
383
+ transform: translate(0) translateZ(0) rotate(0deg);
384
+ opacity: 1;
385
+ }
386
+
387
+ /*
388
+ ----------------------------
389
+ Modal: Blur
390
+ ----------------------------
391
+ */
392
+ .custombox-open-blur .custombox-container-blur {
393
+ filter: blur(3px);
394
+ }
395
+ @media all and (-ms-high-contrast: none) {
396
+ .custombox-open-blur .custombox-container-blur {
397
+ text-shadow: 0 0 8px #000;
398
+ color: rgba(255,255,255,0);
399
+ filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius='3');
400
+ zoom: 1;
401
+ }
402
+ }
403
+ .custombox-modal-blur {
404
+ transform: translateY(-5%);
405
+ opacity: 0;
406
+ position: absolute;
407
+ }
408
+ .custombox-overlay-blur,
409
+ .custombox-modal-container-blur {
410
+ transition-property: all;
411
+ }
412
+ .custombox-modal-open .custombox-modal-blur {
413
+ transform: translateY(0);
414
+ opacity: 1;
415
+ }
416
+
417
+ /*
418
+ ----------------------------
419
+ Modal: 3D Flip generic
420
+ ----------------------------
421
+ */
422
+ .custombox-modal-container-flip {
423
+ perspective: 1300px;
424
+ }
425
+
426
+ /*
427
+ ----------------------------
428
+ Modal: 3D Flip horizontal
429
+ ----------------------------
430
+ */
431
+ .custombox-modal-flip-horizontal {
432
+ position: absolute;
433
+ transform-style: preserve-3d;
434
+ transform: rotateY(-70deg);
435
+ transition-property: all;
436
+ opacity: 0;
437
+ }
438
+ .custombox-modal-open .custombox-modal-flip-horizontal {
439
+ transform: rotateY(0deg);
440
+ opacity: 1;
441
+ }
442
+
443
+ /*
444
+ ----------------------------
445
+ Modal: 3D Flip vertical
446
+ ----------------------------
447
+ */
448
+ .custombox-modal-flip-vertical {
449
+ position: absolute;
450
+ transform-style: preserve-3d;
451
+ transform: rotateX(-70deg);
452
+ transition-property: all;
453
+ opacity: 0;
454
+ }
455
+ .custombox-modal-open .custombox-modal-flip-vertical {
456
+ transform: rotateX(0deg);
457
+ opacity: 1;
458
+ }
459
+
460
+ /*
461
+ ----------------------------
462
+ Modal: 3D Sign
463
+ ----------------------------
464
+ */
465
+ .custombox-modal-container-sign {
466
+ perspective: 1300px;
467
+ }
468
+ .custombox-modal-sign {
469
+ transform-style: preserve-3d;
470
+ transform: rotateX(-60deg);
471
+ transform-origin: 50% 0;
472
+ opacity: 0;
473
+ transition-property: all;
474
+ }
475
+ .custombox-modal-open .custombox-modal-sign {
476
+ transform: rotateX(0deg);
477
+ opacity: 1;
478
+ }
479
+
480
+ /*
481
+ ----------------------------
482
+ Modal: Superscaled
483
+ ----------------------------
484
+ */
485
+ .custombox-modal-superscaled {
486
+ transform: scale(2);
487
+ opacity: 0;
488
+ transition-property: all;
489
+ position: absolute;
490
+ }
491
+ .custombox-modal-open .custombox-modal-superscaled {
492
+ transform: scale(1);
493
+ opacity: 1;
494
+ }
495
+
496
+ /*
497
+ ----------------------------
498
+ Modal: 3D Slit
499
+ ----------------------------
500
+ */
501
+ .custombox-modal-container-slit {
502
+ perspective: 1300px;
503
+ }
504
+ .custombox-modal-slit {
505
+ transform-style: preserve-3d;
506
+ transform: translateZ(-3000px) rotateY(90deg);
507
+ opacity: 0;
508
+ }
509
+ .custombox-modal-open .custombox-modal-slit {
510
+ animation: slit .7s forwards ease-out;
511
+ }
512
+ @keyframes slit {
513
+ 50% {
514
+ transform: translateZ(-250px) rotateY(89deg);
515
+ opacity: 1;
516
+ animation-timing-function: ease-out;
517
+ }
518
+ 100% {
519
+ transform: translateZ(0) rotateY(0deg);
520
+ opacity: 1;
521
+ }
522
+ }
523
+
524
+ /*
525
+ ----------------------------
526
+ Modal: 3D Rotate generic
527
+ ----------------------------
528
+ */
529
+ .custombox-modal-container-rotate {
530
+ perspective: 1300px;
531
+ }
532
+
533
+ /*
534
+ ----------------------------
535
+ Modal: 3D Rotate from bottom
536
+ ----------------------------
537
+ */
538
+ .custombox-modal-rotate-bottom {
539
+ transform-style: preserve-3d;
540
+ transform: translateY(100%) rotateX(90deg);
541
+ transform-origin: 0 100%;
542
+ opacity: 0;
543
+ transition-timing-function: ease-out;
544
+ transition-property: all;
545
+ position: absolute;
546
+ }
547
+ .custombox-modal-open .custombox-modal-rotate-bottom {
548
+ transform: translateY(0) rotateX(0deg);
549
+ opacity: 1;
550
+ }
551
+
552
+ /*
553
+ ----------------------------
554
+ Modal: 3D Rotate from left
555
+ ----------------------------
556
+ */
557
+ .custombox-modal-rotate-left {
558
+ transform-style: preserve-3d;
559
+ transform: translateZ(100px) translateX(-30%) rotateY(90deg);
560
+ transform-origin: 0 100%;
561
+ opacity: 0;
562
+ transition-property: all;
563
+ position: absolute;
564
+ }
565
+ .custombox-modal-open .custombox-modal-rotate-left {
566
+ transform: translateZ(0) translateX(0) rotateY(0deg);
567
+ opacity: 1;
568
+ }
569
+
570
+ /*
571
+ ----------------------------
572
+ Modal: Letmein
573
+ ----------------------------
574
+ */
575
+ .custombox-modal-container-letmein {
576
+ transition-property: transform;
577
+ transform: rotateX(-2deg);
578
+ transform-origin: 50% 0;
579
+ transform-style: preserve-3d;
580
+ opacity: 1;
581
+ }
582
+ .custombox-modal-letmein {
583
+ opacity: 0;
584
+ transform: translateY(300%);
585
+ float: left;
586
+ }
587
+ .custombox-modal-open .custombox-modal-letmein {
588
+ transform: translateY(0);
589
+ opacity: 1;
590
+ transition-property: all;
591
+ }
592
+
593
+ /*
594
+ ----------------------------
595
+ Modal: Makeway
596
+ ----------------------------
597
+ */
598
+ .custombox-modal-makeway {
599
+ transform: translateX(200%);
600
+ opacity: 0;
601
+ float: left;
602
+ }
603
+ .custombox-modal-open .custombox-modal-makeway {
604
+ transform: translateX(0);
605
+ opacity: 1;
606
+ }
607
+ .custombox-modal-wrapper-makeway {
608
+ overflow: hidden;
609
+ }
610
+
611
+ /*
612
+ ----------------------------
613
+ Modal: Slip
614
+ ----------------------------
615
+ */
616
+ .custombox-modal-slip {
617
+ transform: translateY(-350%);
618
+ }
619
+ .custombox-modal-open .custombox-modal-slip {
620
+ transform: translateY(0);
621
+ transition-property: all;
622
+ }
623
+
624
+ /*
625
+ ----------------------------
626
+ Modal: Corner
627
+ ----------------------------
628
+ */
629
+ .custombox-modal-corner {
630
+ opacity: 0;
631
+ transform: translateY(150px) translateX(150px);
632
+ transition-property: opacity, transform, visibility;
633
+ }
634
+ .custombox-modal-open .custombox-modal-corner {
635
+ transform: translateY(0);
636
+ opacity: 1;
637
+ transition-property: opacity, transform;
638
+ }
639
+
640
+ /*
641
+ ----------------------------
642
+ Modal: Slide together
643
+ ----------------------------
644
+ */
645
+ .custombox-modal-slidetogether {
646
+ transform: translateY(-600%);
647
+
648
+ }
649
+ .custombox-modal-open .custombox-modal-slidetogether {
650
+ transform: translateY(0);
651
+ }
652
+
653
+ /*
654
+ ----------------------------
655
+ Modal: Scale
656
+ ----------------------------
657
+ */
658
+ .custombox-modal-scale {
659
+ transform: scale(0.9);
660
+ transition: transform;
661
+ opacity: 0;
662
+ }
663
+ .custombox-modal-open .custombox-modal-scale {
664
+ transform: scale(1);
665
+ transition: transform;
666
+ opacity: 1;
667
+ }
668
+
669
+ /*
670
+ ----------------------------
671
+ Modal: Door
672
+ ----------------------------
673
+ */
674
+ .custombox-modal-door {
675
+ visibility: hidden;
676
+ opacity: 0;
677
+ }
678
+ .custombox-modal-open .custombox-modal-door {
679
+ opacity: 1;
680
+ visibility: visible;
681
+ }
682
+
683
+ /*
684
+ ----------------------------
685
+ Modal: Push
686
+ ----------------------------
687
+ */
688
+ .custombox-modal-push {
689
+ transform: translateX(-300%);
690
+ }
691
+ .custombox-modal-open .custombox-modal-push {
692
+ transform: translateX(0);
693
+ }
694
+
695
+ /*
696
+ ----------------------------
697
+ Modal: Content Scale
698
+ ----------------------------
699
+ */
700
+ .custombox-modal-contentscale {
701
+ transform: translateY(600%);
702
+ transition-property: transform ease-in-out;
703
+ position: absolute;
704
+ }
705
+ .custombox-modal-open .custombox-modal-contentscale {
706
+ transform: translateY(0);
707
+ }
708
+
709
+ /*
710
+ ----------------------------
711
+ Modal: Val
712
+ ----------------------------
713
+ */
714
+ .custombox-modal-swell {
715
+ animation-duration: 0.5s;
716
+ animation-fill-mode: forwards;
717
+ animation-timing-function: ease-out;
718
+ animation-name: swell-close;
719
+ }
720
+ .custombox-modal-open .custombox-modal-swell {
721
+ animation-name: swell-open;
722
+ }
723
+ @keyframes swell-open {
724
+ 0% {
725
+ opacity: 0;
726
+ transform: translate3d(calc(-100vw - 50%), 0, 0);
727
+ }
728
+ 50% {
729
+ opacity: 1;
730
+ transform: translate3d(100px, 0, 0);
731
+ }
732
+ 100% {
733
+ opacity: 1;
734
+ transform: translate3d(0, 0, 0);
735
+ }
736
+ }
737
+ @keyframes swell-close {
738
+ 0% {
739
+ opacity: 1;
740
+ transform: translate3d(0, 0, 0);
741
+ }
742
+ 50% {
743
+ opacity: 1;
744
+ transform: translate3d(-100px, 0, 0) scale3d(1.1, 1.1, 1);
745
+ }
746
+ 100% {
747
+ opacity: 0;
748
+ transform: translate3d(calc(100vw + 50%), 0, 0)
749
+ }
750
+ }
751
+
752
+ /*
753
+ ----------------------------
754
+ Modal: Rotate down
755
+ ----------------------------
756
+ */
757
+ .custombox-modal-rotatedown {
758
+ animation-duration: 0.4s;
759
+ animation-timing-function: cubic-bezier(0.7,0,0.3,1);
760
+ animation-fill-mode: forwards;
761
+ transform-origin: -150% 50%;
762
+ animation-name: rotatedown-close;
763
+ overflow: hidden;
764
+ }
765
+ .custombox-modal-open .custombox-modal-rotatedown {
766
+ animation-name: rotatedown-open;
767
+ }
768
+ .custombox-modal-open .custombox-modal-rotatedown div > * {
769
+ animation: rotatedown-elem 0.4s both;
770
+ transform-origin: -50% 50%;
771
+ animation-timing-function: cubic-bezier(0.7,0,0.3,1);
772
+ animation-delay: 0.15s;
773
+ }
774
+ @keyframes rotatedown-open {
775
+ 0% {
776
+ opacity: 0;
777
+ transform: rotate3d(0, 0, 1, -45deg);
778
+ }
779
+ 100% {
780
+ opacity: 1;
781
+ transform: rotate3d(0, 0, 1, 0deg);
782
+ }
783
+ }
784
+ @keyframes rotatedown-close {
785
+ 0% {
786
+ opacity: 1;
787
+ }
788
+ 100% {
789
+ opacity: 0;
790
+ transform: rotate3d(0, 0, 1, 45deg);
791
+ }
792
+ }
793
+ @keyframes rotatedown-elem {
794
+ 0% {
795
+ opacity: 0;
796
+ transform: translate3d(0, -150px, 0) rotate3d(0, 0, 1, -20deg);
797
+ }
798
+ 100% { opacity: 1;
799
+ transform: translate3d(0, 0, 0) rotate3d(0, 0, 1, 0deg);
800
+ }
801
+ }
802
+
803
+ /*
804
+ ----------------------------
805
+ Modal: Flash
806
+ ----------------------------
807
+ */
808
+ .custombox-modal-flash {
809
+ animation-duration: 0.4s;
810
+ animation-fill-mode: forwards;
811
+ animation-timing-function: cubic-bezier(0.7,0,0.3,1);
812
+ animation-name: flash-close;
813
+ overflow: hidden;
814
+ }
815
+ .custombox-modal-open .custombox-modal-flash {
816
+ animation-name: flash-open;
817
+ }
818
+ .custombox-modal-open .custombox-modal-flash div > * {
819
+ animation: flash-elem-open 0.4s cubic-bezier(0.7,0,0.3,1) both;
820
+ }
821
+ .custombox-modal-flash div > * {
822
+ animation: flash-elem-close 0.4s cubic-bezier(0.7,0,0.3,1) both;
823
+ }
824
+ @keyframes flash-open {
825
+ 0% {
826
+ opacity: 0;
827
+ transform: translate3d(-400px, 0, 0)
828
+ scale3d(1.4, 0, 1);
829
+ }
830
+ 100% {
831
+ opacity: 1;
832
+ transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
833
+ }
834
+ }
835
+ @keyframes flash-close {
836
+ 0% {
837
+ opacity: 1;
838
+ transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
839
+ }
840
+ 20% {
841
+ opacity: 1;
842
+ transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
843
+ }
844
+ 100% {
845
+ opacity: 0;
846
+ transform: translate3d(-400px, 0, 0) scale3d(1.4, 0, 1);
847
+ }
848
+ }
849
+ @keyframes flash-elem-open {
850
+ 0% {
851
+ opacity: 0;
852
+ transform: translate3d(-100px, 0, 0);
853
+ }
854
+ 20% {
855
+ opacity: 0;
856
+ transform: translate3d(-100px, 0, 0);
857
+ }
858
+ 100% {
859
+ opacity: 1;
860
+ transform: translate3d(0, 0, 0);
861
+ }
862
+ }
863
+ @keyframes flash-elem-close {
864
+ 0% {
865
+ opacity: 1;
866
+ transform: translate3d(0, 0, 0);
867
+ }
868
+ 100% {
869
+ opacity: 0;
870
+ transform: translate3d(-100px, 0, 0);
871
+ }
872
+ }
css/reveal.css CHANGED
@@ -2,65 +2,49 @@
2
Reveal Modals
3
-------------------------------------------------- */
4
5
- .reveal-modal-bg {
6
- position: fixed;
7
- height: 100%;
8
- width: 100%;
9
- background: #000;
10
- background: rgba(0,0,0,.8);
11
- z-index: 100;
12
- display: none;
13
- top: 0;
14
- left: 0;
15
- }
16
17
- .reveal-modal {
18
- visibility: hidden;
19
- top: 100px;
20
- left: 50%;
21
- margin-left: -570px;
22
- width: 1050px;
23
- background: #eee url(modal-gloss.png) no-repeat -200px -80px;
24
- position: absolute;
25
- z-index: 101;
26
- padding: 30px 40px 34px;
27
- -moz-border-radius: 5px;
28
- -webkit-border-radius: 5px;
29
- border-radius: 5px;
30
- -moz-box-shadow: 0 0 10px rgba(0,0,0,.4);
31
- -webkit-box-shadow: 0 0 10px rgba(0,0,0,.4);
32
- -box-shadow: 0 0 10px rgba(0,0,0,.4);
33
- }
34
-
35
- .reveal-modal.small { width: 200px; margin-left: -140px;}
36
- .reveal-modal.medium { width: 400px; margin-left: -240px;}
37
- .reveal-modal.large { width: 600px; margin-left: -340px;}
38
- .reveal-modal.xlarge { width: 800px; margin-left: -440px;}
39
-
40
- .reveal-modal .close-reveal-modal {
41
- font-size: 22px;
42
- line-height: .5;
43
- position: absolute;
44
- top: 8px;
45
- right: 11px;
46
- color: #aaa;
47
- text-shadow: 0 -1px 1px rbga(0,0,0,.6);
48
- font-weight: bold;
49
- cursor: pointer;
50
- }
51
- /*
52
-
53
- NOTES
54
-
55
- Close button entity is ×
56
-
57
- Example markup
58
-
59
- <div id="myModal" class="reveal-modal">
60
- <h2>Awesome. I have it.</h2>
61
- <p class="lead">Your couch. I it's mine.</p>
62
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ultrices aliquet placerat. Duis pulvinar orci et nisi euismod vitae tempus lorem consectetur. Duis at magna quis turpis mattis venenatis eget id diam. </p>
63
- <a class="close-reveal-modal">&#215;</a>
64
- </div>
65
-
66
- */
2
Reveal Modals
3
-------------------------------------------------- */
4
5
+ .reveal-modal-bg {
6
+ position: fixed;
7
+ height: 100%;
8
+ width: 100%;
9
+ background: #000;
10
+ background: rgba(0,0,0,.8);
11
+ z-index: 100;
12
+ display: none;
13
+ top: 0;
14
+ left: 0;
15
+ }
16
+
17
+ .reveal-modal {
18
+ visibility: hidden;
19
+ top: 100px;
20
+ left: 50%;
21
+ margin-left: -570px;
22
+ width: 1050px;
23
+ background: #eee url(modal-gloss.png) no-repeat -200px -80px;
24
+ position: absolute;
25
+ z-index: 101;
26
+ padding: 30px 40px 34px;
27
+ -moz-border-radius: 5px;
28
+ -webkit-border-radius: 5px;
29
+ border-radius: 5px;
30
+ -moz-box-shadow: 0 0 10px rgba(0,0,0,.4);
31
+ -webkit-box-shadow: 0 0 10px rgba(0,0,0,.4);
32
+ -box-shadow: 0 0 10px rgba(0,0,0,.4);
33
+ }
34
35
+ .reveal-modal.small { width: 200px; margin-left: -140px;}
36
+ .reveal-modal.medium { width: 400px; margin-left: -240px;}
37
+ .reveal-modal.large { width: 600px; margin-left: -340px;}
38
+ .reveal-modal.xlarge { width: 800px; margin-left: -440px;}
39
+
40
+ .reveal-modal .close-reveal-modal {
41
+ font-size: 22px;
42
+ line-height: .5;
43
+ position: absolute;
44
+ top: 8px;
45
+ right: 11px;
46
+ color: #aaa;
47
+ text-shadow: 0 -1px 1px rbga(0,0,0,.6);
48
+ font-weight: bold;
49
+ cursor: pointer;
50
+ }
css/yop-poll-donate.css CHANGED
@@ -10,7 +10,17 @@
10
padding: 5px 15px 0px 15px;
11
color:#FFFFFF;
12
}
13
-
14
#donate #toggle #toggle_title{
15
width: 12em;
16
display: inline-block;
@@ -21,16 +31,16 @@
21
}
22
23
#donate .inside {
24
- background: #f7f7f7; /* Old browsers */
25
- background: -moz-linear-gradient(45deg, #f7f7f7 0%, #ffffff 100%); /* FF3.6+ */
26
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#f7f7f7), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */
27
- background: -webkit-linear-gradient(45deg, #f7f7f7 0%,#ffffff 100%); /* Chrome10+,Safari5.1+ */
28
- background: -o-linear-gradient(45deg, #f7f7f7 0%,#ffffff 100%); /* Opera 11.10+ */
29
- background: -ms-linear-gradient(45deg, #f7f7f7 0%,#ffffff 100%); /* IE10+ */
30
- background: linear-gradient(45deg, #f7f7f7 0%,#ffffff 100%); /* W3C */
31
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#ffffff',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
32
border: 1px solid #cfcccc;
33
- color: #95abb7;
34
padding: 5px 5px 20px 10px;
35
margin: 0 !important;
36
}
10
padding: 5px 15px 0px 15px;
11
color:#FFFFFF;
12
}
13
+ #donate .header {
14
+ text-align: center;
15
+ font-size: 1.25em;
16
+ font-weight: bold;
17
+ }
18
+ #donate .subheader {
19
+ text-align: left;
20
+ font-size: 1em;
21
+ font-weight: bold;
22
+ margin-left: 0.5em;
23
+ }
24
#donate #toggle #toggle_title{
25
width: 12em;
26
display: inline-block;
31
}
32
33
#donate .inside {
34
+ background: #fff; /* Old browsers */
35
+ background: -moz-linear-gradient(45deg, #fff 0%, #ffffff 100%); /* FF3.6+ */
36
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#f7f7f7), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */
37
+ background: -webkit-linear-gradient(45deg, #fff 0%,#ffffff 100%); /* Chrome10+,Safari5.1+ */
38
+ background: -o-linear-gradient(45deg, #fff 0%,#ffffff 100%); /* Opera 11.10+ */
39
+ background: -ms-linear-gradient(45deg, #fff 0%,#ffffff 100%); /* IE10+ */
40
+ background: linear-gradient(45deg, #fff 0%,#ffffff 100%); /* W3C */
41
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#ffffff',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
42
border: 1px solid #cfcccc;
43
+ color: #000;
44
padding: 5px 5px 20px 10px;
45
margin: 0 !important;
46
}
css/yop-poll-optin2.css CHANGED
@@ -1,35 +1,15 @@
1
- #WFItem394041 {
2
- background: #0097e5; /* Old browsers */
3
- background: -moz-linear-gradient(45deg, #0097e5 0%, #20b3ff 100%); /* FF3.6+ */
4
- background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#0097e5), color-stop(100%,#20b3ff)); /* Chrome,Safari4+ */
5
- background: -webkit-linear-gradient(45deg, #0097e5 0%,#20b3ff 100%); /* Chrome10+,Safari5.1+ */
6
- background: -o-linear-gradient(45deg, #0097e5 0%,#20b3ff 100%); /* Opera 11.10+ */
7
- background: -ms-linear-gradient(45deg, #0097e5 0%,#20b3ff 100%); /* IE10+ */
8
- background: linear-gradient(45deg, #0097e5 0%,#20b3ff 100%); /* W3C */
9
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0097e5', endColorstr='#20b3ff',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
10
- border: 1px solid #cfcccc;
11
- color: #fff;
12
- margin-top: 20px;
13
- height: 190px;
14
- position: relative;
15
- }
16
-
17
-
18
@font-face {
19
font-family: Lato-Reg;
20
src: url(fonts/Lato-Reg.ttf);
21
}
22
-
23
@font-face {
24
font-family: Lato-Lig;
25
src: url(fonts/Lato-Lig.ttf);
26
}
27
-
28
@font-face {
29
font-family: Lato-Bla;
30
src: url(fonts/Lato-Bla.ttf);
31
}
32
-
33
@font-face {
34
font-family: 'FontomasCustomRegular';
35
src: url('fonts/fontomas-webfont.eot');
@@ -37,7 +17,6 @@
37
font-weight: normal;
38
font-style: normal;
39
}
40
-
41
/* Optin */
42
#WFItem394041 {
43
background: #f7f7f7; /* Old browsers */
@@ -54,6 +33,7 @@
54
box-shadow: 0px 0px 9px #dadada;
55
color: #95abb7;
56
text-align: center;
57
height: auto;
58
}
59
#WFItem394041 h1 {
@@ -63,11 +43,10 @@
63
font-family: Lato-Bla, Arial, Helvetica, sans-serif;
64
line-height: 1em;
65
}
66
-
67
#WFItem394041 label {
68
position: relative;
69
}
70
-
71
#WFItem394041 h2 {
72
font-size: 3em;
73
margin-top: 0.5em;
@@ -82,11 +61,12 @@
82
font-weight: bold;
83
color: #95abb7;
84
display: inline;
85
}
86
87
#WFItem394041 #circle {
88
border-radius: 50%;
89
- background: #00a8ff;
90
position: relative;
91
margin: 0 auto;
92
width: 7.75em;
@@ -95,11 +75,12 @@
95
96
#WFItem394041 #email {
97
border-style: none;
98
- border: 1px solid #00a8ff;
99
background: #fff;
100
margin-top: 0.5em;
101
padding-left: 2em;
102
- font-size: 1.125em;
103
font-family: Calibri, Arial, Helvetica, sans-serif;
104
color: #aeaaaa;
105
-webkit-transition: all 0.3s linear;
@@ -107,36 +88,20 @@
107
-o-transition: all 0.3s linear;
108
transition: all 0.3s linear;
109
width: 75%;
110
- height: 2.3em;
111
}
112
113
#WFItem394041 #email:focus {
114
background: #f9f9f9;
115
}
116
117
- #WFItem394041 .wf-button {
118
- margin-top: 10px;
119
- font-size: 1.4em;
120
- height: 1.7em;
121
- margin-bottom: 0.5em;
122
- border: none;
123
- background: #00a8ff;
124
- color: white;
125
- cursor: pointer;
126
- width: 81%;
127
- }
128
-
129
- #WFItem394041 .wf-button:active {
130
- background: #0098e6;
131
- }
132
-
133
#yop-poll-close-modal-box {
134
text-decoration: none;
135
position: absolute;
136
- color: #00A8FF;
137
cursor: pointer;
138
float: right;
139
- font-size: 1.5em;
140
height: 1em;
141
width: 1em;
142
top: 5px;
@@ -147,14 +112,51 @@
147
left: 2px;
148
content: attr(data-icon);
149
font-family: 'FontomasCustomRegular';
150
- color: #00a8ff;
151
position: absolute;
152
left: 5px;
153
top: 4px;
154
width: 20px;
155
}
156
157
#poststuff h2 {
158
-
159
margin-bottom: -15px !important;
160
}
1
@font-face {
2
font-family: Lato-Reg;
3
src: url(fonts/Lato-Reg.ttf);
4
}
5
@font-face {
6
font-family: Lato-Lig;
7
src: url(fonts/Lato-Lig.ttf);
8
}
9
@font-face {
10
font-family: Lato-Bla;
11
src: url(fonts/Lato-Bla.ttf);
12
}
13
@font-face {
14
font-family: 'FontomasCustomRegular';
15
src: url('fonts/fontomas-webfont.eot');
17
font-weight: normal;
18
font-style: normal;
19
}
20
/* Optin */
21
#WFItem394041 {
22
background: #f7f7f7; /* Old browsers */
33
box-shadow: 0px 0px 9px #dadada;
34
color: #95abb7;
35
text-align: center;
36
+ max-width: 400px;
37
height: auto;
38
}
39
#WFItem394041 h1 {
43
font-family: Lato-Bla, Arial, Helvetica, sans-serif;
44
line-height: 1em;
45
}
46
#WFItem394041 label {
47
position: relative;
48
+ font-size: 1.1em;
49
}
50
#WFItem394041 h2 {
51
font-size: 3em;
52
margin-top: 0.5em;
61
font-weight: bold;
62
color: #95abb7;
63
display: inline;
64
+ line-height: 120%;
65
}
66
67
#WFItem394041 #circle {
68
border-radius: 50%;
69
+ background: #0092d5;
70
position: relative;
71
margin: 0 auto;
72
width: 7.75em;
75
76
#WFItem394041 #email {
77
border-style: none;
78
+ border: 1px solid #0092d5;
79
+ border-radius: 5px;
80
background: #fff;
81
margin-top: 0.5em;
82
padding-left: 2em;
83
+ font-size: 1.2em;
84
font-family: Calibri, Arial, Helvetica, sans-serif;
85
color: #aeaaaa;
86
-webkit-transition: all 0.3s linear;
88
-o-transition: all 0.3s linear;
89
transition: all 0.3s linear;
90
width: 75%;
91
+ height: 3em;
92
}
93
94
#WFItem394041 #email:focus {
95
background: #f9f9f9;
96
}
97
98
#yop-poll-close-modal-box {
99
text-decoration: none;
100
position: absolute;
101
+ color: #000;
102
cursor: pointer;
103
float: right;
104
+ font-size: 1.4em;
105
height: 1em;
106
width: 1em;
107
top: 5px;
112
left: 2px;
113
content: attr(data-icon);
114
font-family: 'FontomasCustomRegular';
115
+ color: #0092d5;
116
position: absolute;
117
left: 5px;
118
top: 4px;
119
width: 20px;
120
+ height: 2em;
121
}
122
123
#poststuff h2 {
124
margin-bottom: -15px !important;
125
+ }
126
+ .elButton {
127
+ color: #fff;
128
+ display: inline-block;
129
+ font-weight: bold;
130
+ margin-left: auto;
131
+ margin-right: auto;
132
+ text-align: center !important;
133
+ text-decoration: none !important;
134
+ }
135
+ .elButton:hover {
136
+ color: inherit;
137
+ text-decoration: none;
138
+ }
139
+ .elButton:visited, .elButton:active, .elButton:hover {
140
+ text-decoration: none !important;
141
+ }
142
+ .elButtonColor1 {
143
+ background-color: #0092d5;
144
+ }
145
+ .elButtonColor1:hover {
146
+ background-color: #0c69a8;
147
+ }
148
+ .elButtonSize2 {
149
+ border-radius: 5px;
150
+ font-size: 21px;
151
+ padding: 15px 35px;
152
+ }
153
+ .elButtonBottomBorder {
154
+ border-bottom: 3px solid rgba(0, 0, 0, 0.2);
155
+ border-left: medium none !important;
156
+ border-right: medium none !important;
157
+ }
158
+ .elButtonSub, .elButtonSub1, .elButtonSub2 {
159
+ display: block;
160
+ font-weight: normal;
161
+ opacity: 0.7;
162
}
css/yop-poll-wizard.css CHANGED
@@ -268,7 +268,7 @@ http://tech-laboratory.blogspot.com
268
border: 1px solid #FFD700;
269
font: bold 13px Verdana, Arial, Helvetica, sans-serif;
270
color:#5A5655;
271
- background: #FFF url(../images/loader.gif) no-repeat 5px;
272
-moz-border-radius : 5px;
273
-webkit-border-radius: 5px;
274
z-index:998;
268
border: 1px solid #FFD700;
269
font: bold 13px Verdana, Arial, Helvetica, sans-serif;
270
color:#5A5655;
271
+ background: #FFF url(../images/loading100x1001.gif) no-repeat 5px;
272
-moz-border-radius : 5px;
273
-webkit-border-radius: 5px;
274
z-index:998;
inc/admin.php CHANGED
@@ -230,9 +230,9 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
230
public function ajax_modal_option_signup() {
231
$optin_box_modal_options = get_option( 'yop_poll_optin_box_modal_options_yop' );
232
$optin_box_modal_options ['modal_had_submit'] = 'yes';
233
- $optin_box_modal_options['modal_email']=isset($_POST['email'])?$_POST['email']:"johndoe@email.com";
234
- update_option( 'yop_poll_optin_box_modal_options', $optin_box_modal_options );
235
- die ();
236
}
237
public function ajax_show_optin_box_modal() {
238
$this->yop_poll_optin_form1();
@@ -443,12 +443,11 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
443
<?php
444
}
445
public function ajax_sidebar_option_signup() {
446
-
447
- $optin_box_modal_options = get_option( 'yop_poll_optin_box_modal_options_yop' );
448
- $optin_box_modal_options ['sidebar_had_submit'] = 'yes';
449
- $optin_box_modal_options ['modal_had_submit'] = 'yes';
450
- $optin_box_modal_options['modal_email']=isset($_POST['email'])?$_POST['email']:"johndoe@email.com";
451
- update_option( 'yop_poll_optin_box_modal_options_yop', $optin_box_modal_options );
452
die ();
453
}
454
@@ -916,15 +915,15 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
916
<script type="text/javascript">
917
function close_window() {
918
var yop_poll_various_config = new Object();
919
- yop_poll_various_config.poll_id = '<?php echo yop_poll_base64_decode( $_GET['poll_id'] ) ?>';
920
- yop_poll_various_config.unique_id = '<?php echo yop_poll_base64_decode( $_GET['unique_id'] ) ?>';
921
- yop_poll_various_config.poll_location = '<?php echo yop_poll_base64_decode( $_GET['poll_location'] ) ?>';
922
- yop_poll_various_config.is_modal = <?php echo ( yop_poll_base64_decode( $_GET['is_modal'] ) == 'true' ) ? 'true' : 'false' ?>;
923
- yop_poll_various_config.vote_loading_image_target = '<?php echo yop_poll_base64_decode( $_GET['vote_loading_image_target'] ) ?>';
924
- yop_poll_various_config.vote_loading_image_id = '<?php echo yop_poll_base64_decode( $_GET['vote_loading_image_id'] ) ?>';
925
- yop_poll_various_config.vote_type = '<?php echo yop_poll_base64_decode( $_GET['vote_type'] ) ?>';
926
- yop_poll_various_config.facebook_user_details = '<?php echo $facebook_user_details; ?>';
927
- yop_poll_various_config.facebook_error = '<?php echo $error ?>';
928
yop_poll_various_config.public_config = <?php echo json_encode( $public_config ); ?>;
929
window.opener.jQuery( '#yop-poll-nonce-' + yop_poll_various_config.poll_id +
930
yop_poll_various_config.unique_id ).val( '<?php echo wp_create_nonce( 'yop_poll-'.$poll_id.$unique_id.'-user-actions' ) ?>' );
@@ -982,7 +981,7 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
982
yop_poll_various_config.vote_loading_image_id = '<?php echo xss_clean(yop_poll_base64_decode( $_GET['vote_loading_image_id'] )) ?>';
983
yop_poll_various_config.vote_type = '<?php echo xss_clean(yop_poll_base64_decode ( $_GET['vote_type'] ) ) ?>';
984
yop_poll_various_config.facebook_user_details = '<?php echo $facebook_user_details; ?>';
985
- yop_poll_various_config.facebook_error = '<?php echo isset( $_GET['facebook_error'] ) ? $_GET['facebook_error'] : '' ?>';
986
yop_poll_various_config.public_config = <?php echo json_encode( $public_config ); ?>;
987
window.opener.jQuery( '#yop-poll-nonce-' + yop_poll_various_config.poll_id +
988
yop_poll_various_config.unique_id ).val( '<?php echo wp_create_nonce( 'yop_poll-'.$poll_id.$unique_id.'-user-actions' ) ?>' );
@@ -1024,30 +1023,17 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
1024
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1025
<html xmlns="http://www.w3.org/1999/xhtml">
1026
<head>
1027
- <style>
1028
- .label-design{
1029
- display: inline-block;
1030
- width: 140px;
1031
- }
1032
- .input-design{
1033
- background: #2ea2cc; font-size: 14px;
1034
- background: -webkit-gradient(linear, left top, left bottom, from(#2ea2cc), to(#1e8cbe));
1035
- background: -webkit-linear-gradient(top, #2ea2cc 0%,#1e8cbe 100%);
1036
- background: linear-gradient(top, #2ea2cc 0%,#1e8cbe 100%);
1037
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2ea2cc', endColorstr='#1e8cbe',GradientType=0 );
1038
- border-color: #0074a2;
1039
- -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
1040
- box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
1041
- color: #fff;
1042
- text-decoration: none;
1043
- text-shadow: 0 1px 0 rgba(0,86,132,0.7);
1044
- cursor: pointer;
1045
- }
1046
- </style>
1047
<title><?php _e( "Insert Poll", 'yop_poll' ); ?></title>
1048
<script type="text/javascript"
1049
src="<?php echo get_option( 'siteurl' ) ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
1050
<script type="text/javascript">
1051
function insertYopPollTinyMce(poll_id, tr_id,show_results) {
1052
tr_id = typeof tr_id !== 'undefined' ? tr_id : '';
1053
show_results = typeof show_results !== 'undefined' ? show_results : '';
@@ -1057,18 +1043,22 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
1057
}
1058
else {
1059
if( poll_id != null && poll_id != '' ) {
1060
- if( tr_id != '' ) {
1061
- tinyMCEPopup.editor.execCommand( 'mceInsertContent', false,
1062
- '[yop_poll id="' + poll_id + '" tr_id="' +
1063
- tr_id + '"' + '" show_results="' +
1064
- show_results + '"]' );
1065
- }
1066
- else {
1067
- tinyMCEPopup.editor.execCommand( 'mceInsertContent', false,
1068
- '[yop_poll id="' + poll_id + '" tr_id="' +
1069
- tr_id + '"' + '" show_results="' +
1070
- show_results + '"]' );
1071
- }
1072
}
1073
else {
1074
tinyMCEPopup.editor.execCommand( 'mceInsertContent', false, '[yop_poll]' );
@@ -1077,56 +1067,133 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
1077
}
1078
}
1079
</script>
1080
</head>
1081
<body>
1082
- <p>
1083
- <label class="label-design" for="yop-poll-id-dialog"> <span><?php _e("Poll to Display", 'yop_poll' ); ?>:</span>
1084
- </label>
1085
- <select class="widefat" name="yop_poll_id" id="yop-poll-id-dialog">
1086
- <option value="-3"><?php _e( "Display Random Poll", 'yop_poll' ); ?></option>
1087
- <option value="-2"><?php _e( "Display Latest Poll", 'yop_poll' ); ?></option>
1088
- <option value="-1"><?php _e( "Display Current Active Poll", 'yop_poll' ); ?></option>
1089
- <?php
1090
- if( count( $yop_polls ) > 0 ) {
1091
- foreach( $yop_polls as $yop_poll ) {
1092
- ?>
1093
- <option value="<?php echo $yop_poll['ID']; ?>"><?php echo esc_html( stripslashes( $yop_poll['poll_title'] ) ); ?></option>
1094
- <?php
1095
- }
1096
- }
1097
- ?>
1098
- </select>
1099
-
1100
- <br/>
1101
- <br/>
1102
- <label class="label-design" for="yop-poll-tr-id-dialog"> <span ><?php _e( "Tracking ID", 'yop_poll' ); ?>:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1103
-
1104
- </label>
1105
- <input class="widefat" name="yop_poll_tr_id" id="yop-poll-tr-id-dialog"/>
1106
- <br/>
1107
- <br>
1108
- <label class="label-design" for="yop-poll-tr-results-html-dialog"> <span ><?php _e( "Display results only", 'yop_poll' ); ?>:</span>
1109
- </label>
1110
- <select
1111
- name="show_results"
1112
- id="yop-poll-tr-results-html-dialog"
1113
- class="widefat">
1114
- <option value="-1"><?php _e( "No", 'yop_poll' ); ?></option>
1115
- <option value="1"><?php _e( "Yes", 'yop_poll' ); ?></option>
1116
- </select>
1117
-
1118
-
1119
-
1120
-
1121
-
1122
- <center><input type="button"
1123
- class="button-primary input-design"
1124
value="<?php _e( "Insert Poll", 'yop_poll' ); ?>"
1125
- onclick=" insertYopPollTinyMce( document.getElementById('yop-poll-id-dialog').value, document.getElementById('yop-poll-tr-id-dialog').value ,document.getElementById('yop-poll-tr-results-html-dialog').value);"/>
1126
- </center>
1127
- <br/>
1128
-
1129
- </p>
1130
</body>
1131
</html>
1132
<?php
@@ -1142,8 +1209,145 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
1142
require_once( YOP_POLL_MODELS . 'yop_poll_model.php' );
1143
$yop_polls = Yop_Poll_Model::get_polls_for_view();
1144
?>
1145
<p style="text-align: center;">
1146
- <label for="yop-poll-id-html-dialog"> <span><?php _e( 'Poll to Display', 'yop_poll' ); ?>:</span>
1147
<select class="widefat" name="yop_poll_id" id="yop-poll-id-html-dialog">
1148
<option value="-3"><?php _e( 'Display Random Poll', 'yop_poll' ); ?></option>
1149
<option value="-2"><?php _e( 'Display Latest Poll', 'yop_poll' ); ?></option>
@@ -1152,7 +1356,9 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
1152
if( count( $yop_polls ) > 0 ) {
1153
foreach( $yop_polls as $yop_poll ) {
1154
?>
1155
- <option value="<?php echo $yop_poll['ID']; ?>"><?php echo esc_html( stripslashes( $yop_poll['poll_title'] ) ); ?></option>
1156
<?php
1157
}
1158
}
@@ -1185,12 +1391,9 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
1185
class=""
1186
value="<?php _e( 'Insert Poll', 'yop_poll' ); ?>"
1187
onclick=" insertYopPoll( edCanvas, document.getElementById('yop-poll-id-html-dialog').value, document.getElementById('yop-poll-tr-id-html-dialog').value ,document.getElementById('yop-poll-tr-results-html-dialog'));"/>
1188
- <br/> <br/> <input type="button"
1189
- class=""
1190
- value="<?php _e( 'Close', 'yop_poll' ); ?>"
1191
- onclick="tb_remove();"/>
1192
</p>
1193
-
1194
<?php
1195
}
1196
die ();
@@ -1267,14 +1470,8 @@ class Yop_Poll_Admin extends Yop_Poll_Plugin {
1267
wp_die( __yop_poll( 'You are not allowed to access this request.' ) );
1268
1269
}
1270
-
1271
-
1272
-
1273
$pollAdminObj = YOP_POLL_Poll_Admin::get_instance();
1274
-
1275
-
1276
$pollAdminObj->add_votes();
1277
-
1278
}
1279
1280
die();
230
public function ajax_modal_option_signup() {
231
$optin_box_modal_options = get_option( 'yop_poll_optin_box_modal_options_yop' );
232
$optin_box_modal_options ['modal_had_submit'] = 'yes';
233
+ $optin_box_modal_options['modal_email']=isset($_GET['email'])?$_GET['email']:"johndoe@email.com";
234
+ update_option( 'yop_poll_optin_box_modal_options_yop', $optin_box_modal_options );
235
+ die();
236
}
237
public function ajax_show_optin_box_modal() {
238
$this->yop_poll_optin_form1();
443
<?php
444
}
445
public function ajax_sidebar_option_signup() {
446
+ $optin_box_modal_options = get_option( 'yop_poll_optin_box_modal_options_yop' );
447
+ $optin_box_modal_options ['sidebar_had_submit'] = 'yes';
448
+ $optin_box_modal_options ['modal_had_submit'] = 'yes';
449
+ $optin_box_modal_options['modal_email']=isset($_POST['email'])?$_POST['email']:"johndoe@email.com";
450
+ update_option( 'yop_poll_optin_box_modal_options_yop', $optin_box_modal_options );
451
die ();
452
}
453
915
<script type="text/javascript">
916
function close_window() {
917
var yop_poll_various_config = new Object();
918
+ yop_poll_various_config.poll_id = '<?php echo xss_clean( yop_poll_base64_decode( $_GET['poll_id'] ) ) ?>';
919
+ yop_poll_various_config.unique_id = '<?php echo xss_clean( yop_poll_base64_decode( $_GET['unique_id'] ) ) ?>';
920
+ yop_poll_various_config.poll_location = '<?php echo xss_clean( yop_poll_base64_decode( $_GET['poll_location'] ) ) ?>';
921
+ yop_poll_various_config.is_modal = <?php echo ( xss_clean( yop_poll_base64_decode( $_GET['is_modal'] ) ) == 'true' ) ? 'true' : 'false' ?>;
922
+ yop_poll_various_config.vote_loading_image_target = '<?php echo xss_clean( yop_poll_base64_decode( $_GET['vote_loading_image_target'] ) ) ?>';
923
+ yop_poll_various_config.vote_loading_image_id = '<?php echo xss_clean( yop_poll_base64_decode( $_GET['vote_loading_image_id'] ) ) ?>';
924
+ yop_poll_various_config.vote_type = '<?php echo xss_clean( yop_poll_base64_decode( $_GET['vote_type'] ) ) ?>';
925
+ yop_poll_various_config.facebook_user_details = '<?php echo $facebook_user_details; ?>';
926
+ yop_poll_various_config.facebook_error = '<?php echo $error ?>';
927
yop_poll_various_config.public_config = <?php echo json_encode( $public_config ); ?>;
928
window.opener.jQuery( '#yop-poll-nonce-' + yop_poll_various_config.poll_id +
929
yop_poll_various_config.unique_id ).val( '<?php echo wp_create_nonce( 'yop_poll-'.$poll_id.$unique_id.'-user-actions' ) ?>' );
981
yop_poll_various_config.vote_loading_image_id = '<?php echo xss_clean(yop_poll_base64_decode( $_GET['vote_loading_image_id'] )) ?>';
982
yop_poll_various_config.vote_type = '<?php echo xss_clean(yop_poll_base64_decode ( $_GET['vote_type'] ) ) ?>';
983
yop_poll_various_config.facebook_user_details = '<?php echo $facebook_user_details; ?>';
984
+ yop_poll_various_config.facebook_error = '<?php echo isset( $_GET['facebook_error'] ) ? xss_clean($_GET['facebook_error']) : '' ?>';
985
yop_poll_various_config.public_config = <?php echo json_encode( $public_config ); ?>;
986
window.opener.jQuery( '#yop-poll-nonce-' + yop_poll_various_config.poll_id +
987
yop_poll_various_config.unique_id ).val( '<?php echo wp_create_nonce( 'yop_poll-'.$poll_id.$unique_id.'-user-actions' ) ?>' );
1023
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1024
<html xmlns="http://www.w3.org/1999/xhtml">
1025
<head>
1026
<title><?php _e( "Insert Poll", 'yop_poll' ); ?></title>
1027
<script type="text/javascript"
1028
src="<?php echo get_option( 'siteurl' ) ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
1029
<script type="text/javascript">
1030
+ var yop_display_results = "-1";
1031
+ function getYOPDisplayResults(){
1032
+ var yop_results_radio = document.getElementsByName( "show_results" );
1033
+ if( yop_results_radio[1].checked ) {
1034
+ yop_display_results = "1";
1035
+ }
1036
+ }
1037
function insertYopPollTinyMce(poll_id, tr_id,show_results) {
1038
tr_id = typeof tr_id !== 'undefined' ? tr_id : '';
1039
show_results = typeof show_results !== 'undefined' ? show_results : '';
1043
}
1044
else {
1045
if( poll_id != null && poll_id != '' ) {
1046
+ if( show_results == "-1") {
1047
+ if( tr_id != '' ) {
1048
+ tinyMCEPopup.editor.execCommand( 'mceInsertContent', false,
1049
+ '[yop_poll id="' + poll_id + '" tr_id="' +
1050
+ tr_id + '"]' );
1051
+ }
1052
+ else {
1053
+ tinyMCEPopup.editor.execCommand( 'mceInsertContent', false,
1054
+ '[yop_poll id="' + poll_id + '"]' );
1055
+ }
1056
+ }
1057
+ else {
1058
+ tinyMCEPopup.editor.execCommand( 'mceInsertContent', false,
1059
+ '[yop_poll id="' + poll_id + '" show_results="' +
1060
+ show_results + '"]' );
1061
+ }
1062
}
1063
else {
1064
tinyMCEPopup.editor.execCommand( 'mceInsertContent', false, '[yop_poll]' );
1067
}
1068
}
1069
</script>
1070
+ <style>
1071
+ body {
1072
+ background: #ffffff 50% 50% repeat-x;
1073
+ }
1074
+ select {
1075
+ background-color: #fff;
1076
+ outline: 0;
1077
+ transition: .05s border-color ease-in-out;
1078
+ margin: 1px;
1079
+ padding: 3px 5px;
1080
+ font-size: 13px;
1081
+ line-height: 26px;
1082
+ height: 28px;
1083
+ }
1084
+ input[type="text"] {
1085
+ background-color: #fff;
1086
+ outline: 0;
1087
+ transition: .05s border-color ease-in-out;
1088
+ margin: 1px;
1089
+ padding: 3px 5px;
1090
+ font-size: 13px;
1091
+ line-height: 26px;
1092
+ height: 28px;
1093
+ }
1094
+ input[type="radio"] {
1095
+ background-color: #fff;
1096
+ outline: 0;
1097
+ transition: .05s border-color ease-in-out;
1098
+ margin: 1px;
1099
+ padding: 3px 5px;
1100
+ font-size: 13px;
1101
+ line-height: 26px;
1102
+ }
1103
+ input[type="button"] {
1104
+ color: #555;
1105
+ border-color: #ccc;
1106
+ background: #f7f7f7;
1107
+ -webkit-box-shadow: inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);
1108
+ box-shadow: inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);
1109
+ vertical-align: top;
1110
+ display: inline-block;
1111
+ text-decoration: none;
1112
+ font-size: 13px;
1113
+ line-height: 26px;
1114
+ height: 28px;
1115
+ margin: 0;
1116
+ padding: 0 10px 1px;
1117
+ cursor: pointer;
1118
+ border-width: 1px;
1119
+ border-style: solid;
1120
+ -webkit-appearance: none;
1121
+ -webkit-border-radius: 3px;
1122
+ border-radius: 3px;
1123
+ white-space: nowrap;
1124
+ -webkit-box-sizing: border-box;
1125
+ }
1126
+ table {
1127
+ width: 95%;
1128
+ height: 95%;
1129
+ margin: auto;
1130
+ border: 1px solid #e5e5e5;
1131
+ -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04);
1132
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
1133
+ border-spacing: 0;
1134
+ width: 100%;
1135
+ clear: both;
1136
+ margin: 0;
1137
+ }
1138
+ tr {
1139
+ line-height: 40px;
1140
+ }
1141
+ td {
1142
+ padding-left: 10px;
1143
+ }
1144
+ </style>
1145
</head>
1146
<body>
1147
+ <table>
1148
+ <tr>
1149
+ <td>
1150
+ <?php _e("Poll to Display", 'yop_poll' ); ?>:
1151
+ </td>
1152
+ <td>
1153
+ <select class="widefat" name="yop_poll_id" id="yop-poll-id-dialog">
1154
+ <option value="-3"><?php _e( "Display Random Poll", 'yop_poll' ); ?></option>
1155
+ <option value="-2"><?php _e( "Display Latest Poll", 'yop_poll' ); ?></option>
1156
+ <option value="-1"><?php _e( "Display Current Active Poll", 'yop_poll' ); ?></option>
1157
+ <?php
1158
+ if( count( $yop_polls ) > 0 ) {
1159
+ foreach( $yop_polls as $yop_poll ) {
1160
+ ?>
1161
+ <option value="<?php echo $yop_poll['ID']; ?>">
1162
+ <?php echo esc_html( stripslashes( $yop_poll['poll_title'] ) ); ?>
1163
+ </option>
1164
+ <?php
1165
+ }
1166
+ }
1167
+ ?>
1168
+ </select>
1169
+ </td>
1170
+ </tr>
1171
+ <tr>
1172
+ <td>
1173
+ <?php _e( "Tracking ID", 'yop_poll' ); ?>:
1174
+ </td>
1175
+ <td>
1176
+ <input type="text" name="yop_poll_tr_id" id="yop-poll-tr-id-dialog" size="35" placeholder="Leave empty if none" />
1177
+ </td>
1178
+ </tr>
1179
+ <tr>
1180
+ <td>
1181
+ <? _e( "Display Results Only", 'yop-poll' ); ?>:
1182
+ </td>
1183
+ <td>
1184
+ <input type="radio" name="show_results" value="-1" checked="checked">No
1185
+ <input type="radio" name="show_results" value="1">Yes
1186
+ </td>
1187
+ </tr>
1188
+ <tr>
1189
+ <td colspan="2" style="text-align:center;">
1190
+ <input type="button"
1191
+ class="button button-primary input-design"
1192
value="<?php _e( "Insert Poll", 'yop_poll' ); ?>"
1193
+ onclick="getYOPDisplayResults(); insertYopPollTinyMce( document.getElementById('yop-poll-id-dialog').value, document.getElementById('yop-poll-tr-id-dialog').value, yop_display_results);"/>
1194
+ </td>
1195
+ </tr>
1196
+ </table>
1197
</body>
1198
</html>
1199
<?php
1209
require_once( YOP_POLL_MODELS . 'yop_poll_model.php' );
1210
$yop_polls = Yop_Poll_Model::get_polls_for_view();
1211
?>
1212
+ <title><?php _e( "Insert Poll", 'yop_poll' ); ?></title>
1213
+ <style>
1214
+ body {
1215
+ background: #ffffff 50% 50% repeat-x;
1216
+ }
1217
+ select {
1218
+ background-color: #fff;
1219
+ outline: 0;
1220
+ transition: .05s border-color ease-in-out;
1221
+ margin: 1px;
1222
+ padding: 3px 5px;
1223
+ font-size: 13px;
1224
+ line-height: 26px;
1225
+ height: 28px;
1226
+ }
1227
+ input[type="text"] {
1228
+ background-color: #fff;
1229
+ outline: 0;
1230
+ transition: .05s border-color ease-in-out;
1231
+ margin: 1px;
1232
+ padding: 3px 5px;
1233
+ font-size: 13px;
1234
+ line-height: 26px;
1235
+ height: 28px;
1236
+ }
1237
+ input[type="radio"] {
1238
+ background-color: #fff;
1239
+ outline: 0;
1240
+ transition: .05s border-color ease-in-out;
1241
+ margin: 1px;
1242
+ padding: 3px 5px;
1243
+ font-size: 13px;
1244
+ line-height: 26px;
1245
+ }
1246
+ input[type="button"] {
1247
+ color: #555;
1248
+ border-color: #ccc;
1249
+ background: #f7f7f7;
1250
+ -webkit-box-shadow: inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);
1251
+ box-shadow: inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);
1252
+ vertical-align: top;
1253
+ display: inline-block;
1254
+ text-decoration: none;
1255
+ font-size: 13px;
1256
+ line-height: 26px;
1257
+ height: 28px;
1258
+ margin: 0;
1259
+ padding: 0 10px 1px;
1260
+ cursor: pointer;
1261
+ border-width: 1px;
1262
+ border-style: solid;
1263
+ -webkit-appearance: none;
1264
+ -webkit-border-radius: 3px;
1265
+ border-radius: 3px;
1266
+ white-space: nowrap;
1267
+ -webkit-box-sizing: border-box;
1268
+ }
1269
+ table {
1270
+ width: 95%;
1271
+ height: 95%;
1272
+ margin: auto;
1273
+ border: 1px solid #e5e5e5;
1274
+ -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04);
1275
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
1276
+ border-spacing: 0;
1277
+ width: 100%;
1278
+ clear: both;
1279
+ margin: 0;
1280
+ }
1281
+ tr {
1282
+ line-height: 40px;
1283
+ }
1284
+ td {
1285
+ padding-left: 10px;
1286
+ }
1287
+ </style>
1288
+ <script>
1289
+ var yop_display_results = "-1";
1290
+ function getYOPDisplayResults(){
1291
+ var yop_results_radio = document.getElementsByName( "show_results" );
1292
+ if( yop_results_radio[1].checked ) {
1293
+ yop_display_results = "1";
1294
+ }
1295
+ }
1296
+ </script>
1297
+ <table>
1298
+ <tr>
1299
+ <td>
1300
+ <?php _e("Poll to Display", 'yop_poll' ); ?>:
1301
+ </td>
1302
+ <td>
1303
+ <select class="widefat" name="yop_poll_id" id="yop-poll-id-dialog">
1304
+ <option value="-3"><?php _e( "Display Random Poll", 'yop_poll' ); ?></option>
1305
+ <option value="-2"><?php _e( "Display Latest Poll", 'yop_poll' ); ?></option>
1306
+ <option value="-1"><?php _e( "Display Current Active Poll", 'yop_poll' ); ?></option>
1307
+ <?php
1308
+ if( count( $yop_polls ) > 0 ) {
1309
+ foreach( $yop_polls as $yop_poll ) {
1310
+ ?>
1311
+ <option value="<?php echo $yop_poll['ID']; ?>">
1312
+ <?php echo esc_html( stripslashes( $yop_poll['poll_title'] ) ); ?>
1313
+ </option>
1314
+ <?php
1315
+ }
1316
+ }
1317
+ ?>
1318
+ </select>
1319
+ </td>
1320
+ </tr>
1321
+ <tr>
1322
+ <td>
1323
+ <?php _e( "Tracking ID", 'yop_poll' ); ?>:
1324
+ </td>
1325
+ <td>
1326
+ <input type="text" name="yop_poll_tr_id" id="yop-poll-tr-id-dialog" size="35" placeholder="Leave empty if none" />
1327
+ </td>
1328
+ </tr>
1329
+ <tr>
1330
+ <td>
1331
+ <? _e( "Display Results Only", 'yop-poll' ); ?>:
1332
+ </td>
1333
+ <td>
1334
+ <input type="radio" name="show_results" value="-1" checked="checked">No
1335
+ <input type="radio" name="show_results" value="1">Yes
1336
+ </td>
1337
+ </tr>
1338
+ <tr>
1339
+ <td colspan="2" style="text-align:center;">
1340
+ <input type="button"
1341
+ class="button"
1342
+ value="<?php _e( "Insert Poll", 'yop_poll' ); ?>"
1343
+ onclick="getYOPDisplayResults(); insertYopPoll( edCanvas, document.getElementById('yop-poll-id-dialog').value, document.getElementById('yop-poll-tr-id-dialog').value, yop_display_results);" />
1344
+ </td>
1345
+ </tr>
1346
+ </table>
1347
+
1348
+ <!--
1349
<p style="text-align: center;">
1350
+ <label for="yop-poll-id-html-dialog"> <span><?php _e( 'Pollsss to Display', 'yop_poll' ); ?>:</span>
1351
<select class="widefat" name="yop_poll_id" id="yop-poll-id-html-dialog">
1352
<option value="-3"><?php _e( 'Display Random Poll', 'yop_poll' ); ?></option>
1353
<option value="-2"><?php _e( 'Display Latest Poll', 'yop_poll' ); ?></option>
1356
if( count( $yop_polls ) > 0 ) {
1357
foreach( $yop_polls as $yop_poll ) {
1358
?>
1359
+ <option value="<?php echo $yop_poll['ID']; ?>">
1360
+ <?php echo esc_html( stripslashes( $yop_poll['poll_title'] ) ); ?>
1361
+ </option>
1362
<?php
1363
}
1364
}
1391
class=""
1392
value="<?php _e( 'Insert Poll', 'yop_poll' ); ?>"
1393
onclick=" insertYopPoll( edCanvas, document.getElementById('yop-poll-id-html-dialog').value, document.getElementById('yop-poll-tr-id-html-dialog').value ,document.getElementById('yop-poll-tr-results-html-dialog'));"/>
1394
+ <br/>
1395
</p>
1396
+ -->
1397
<?php
1398
}
1399
die ();
1470
wp_die( __yop_poll( 'You are not allowed to access this request.' ) );
1471
1472
}
1473
$pollAdminObj = YOP_POLL_Poll_Admin::get_instance();
1474
$pollAdminObj->add_votes();
1475
}
1476
1477
die();
inc/config.php CHANGED
@@ -1 +1 @@
1
- <?php
2
class Yop_Poll_Config {
3
protected $config;
4
public function __construct( array $config ) {
5
$this->config = $config;
6
}
7
public function __get( $name ) {
8
$value = false;
9
if ( array_key_exists( $name, $this->config ) ) {
10
$value = $this->config[ $name ];
11
}
12
return $value;
13
}
14
public function __set( $name, $value ) {
15
$this->config[ $name ] = $value;
16
}
17
}
1
class Yop_Poll_Config {
2
protected $config;
3
public function __construct( array $config ) {
4
$this->config = $config;
5
}
6
public function __get( $name ) {
7
$value = false;
8
if ( array_key_exists( $name, $this->config ) ) {
9
$value = $this->config[ $name ];
10
}
11
return $value;
12
}
13
public function __set( $name, $value ) {
14
$this->config[ $name ] = $value;
15
}
16
}
17
+ <?php
inc/logs_admin.php CHANGED
@@ -232,7 +232,7 @@ class YOP_POLL_Logs_Admin extends YOP_POLL_Abstract_Admin{
232
233
if(isset($data['poll_id']))
234
$filters[0]['value']=$_REQUEST['poll_id'];
235
- if($_REQUEST['s']!=""||$data['log_sdate']!=""||$data['log_edate']!=""){
236
237
$args = array(
238
'search' => array( 'fields' => array( 'poll_id' ), 'value' => isset ( $poll_id ) ? $poll_id : '' ), 'orderby' => $orderby, 'order' => $order );
@@ -240,7 +240,7 @@ class YOP_POLL_Logs_Admin extends YOP_POLL_Abstract_Admin{
240
}
241
else
242
$args = array(
243
- 'filters' => $filters,'orderby' => $data['orderby'], 'order' => $order);
244
$total_logs=self::get_polls_logs_filter_search($args);
245
$data['total_logs']= count($total_logs);
246
$data['total_logs_pages'] = ceil( $data['total_logs'] / $data['per_page'] );
232
233
if(isset($data['poll_id']))
234
$filters[0]['value']=$_REQUEST['poll_id'];
235
+ if( ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] !="" ) || $data['log_sdate'] !="" || $data['log_edate']!="" ){
236
237
$args = array(
238
'search' => array( 'fields' => array( 'poll_id' ), 'value' => isset ( $poll_id ) ? $poll_id : '' ), 'orderby' => $orderby, 'order' => $order );
240
}
241
else
242
$args = array(
243
+ 'filters' => $filters, 'orderby' => $orderby, 'order' => $order);
244
$total_logs=self::get_polls_logs_filter_search($args);
245
$data['total_logs']= count($total_logs);
246
$data['total_logs_pages'] = ceil( $data['total_logs'] / $data['per_page'] );
inc/maintenance.php CHANGED
@@ -154,7 +154,7 @@ class YOP_POLL_Maintenance
154
function propagate_activation($networkwide)
155
{
156
if (version_compare(phpversion(), '5.3', '<')) {
157
- wp_die("Php version isn't high enough!");
158
}
159
160
$this->network_propagate('activate', $networkwide);
@@ -761,6 +761,10 @@ NOWDOC;
761
global $wpdb;
762
update_option("yop_poll_version", '5.7.7');
763
}
764
}
765
766
private static function update_poll_template_in_database2($template)
154
function propagate_activation($networkwide)
155
{
156
if (version_compare(phpversion(), '5.3', '<')) {
157
+ wp_die("Your server is running php lower than 5.3. Please update your Php version and try again!");
158
}
159
160
$this->network_propagate('activate', $networkwide);
761
global $wpdb;
762
update_option("yop_poll_version", '5.7.7');
763
}
764
+ if (version_compare($installed_version, '5.7.7', '<=')) {
765
+ global $wpdb;
766
+ update_option("yop_poll_version", '5.7.8');
767
+ }
768
}
769
770
private static function update_poll_template_in_database2($template)
inc/poll_admin.php CHANGED
@@ -73,7 +73,6 @@ class YOP_POLL_Poll_Admin extends YOP_POLL_Abstract_Admin {
73
break;
74
75
default:
76
-
77
$this->manage_add_new();
78
break;
79
}
@@ -122,8 +121,6 @@ class YOP_POLL_Poll_Admin extends YOP_POLL_Abstract_Admin {
122
}
123
124
private function manage_add_new() {
125
-
126
-
127
$this->view_add_edit( 'add' );
128
}
129
@@ -186,8 +183,7 @@ class YOP_POLL_Poll_Admin extends YOP_POLL_Abstract_Admin {
186
$date_format="m-d-Y";
187
}
188
$data['date_format']=$date_format.' '.$time_format;
189
- // wp_enqueue_style( 'yop-poll-add-edit-css', YOP_POLL_URL . 'css/polls/add-edit.css', array(), YOP_POLL_VERSION );
190
- // wp_enqueue_style( 'yop-poll-admin-css', YOP_POLL_URL . 'css/yop-poll-admin.css', array(), YOP_POLL_VERSION );
191
192
wp_enqueue_style( 'yop-poll-slider-css', YOP_POLL_URL . 'css/yop-poll-slider.css', array(), YOP_POLL_VERSION );
193
@@ -207,9 +203,13 @@ class YOP_POLL_Poll_Admin extends YOP_POLL_Abstract_Admin {
207
'jquery',
208
'jquery-ui-dialog'
209
), YOP_POLL_VERSION, true );
210
if ( $optin_box_modal_options['show'] == 'yes' ){
211
- wp_enqueue_script( 'yop-poll-modal-box-js', YOP_POLL_URL."modal/js/jquery.modalbox-1.5.0-min.js", array( 'jquery' ), YOP_POLL_VERSION, true );
212
- wp_enqueue_script( 'yop-poll-modal-functions',YOP_POLL_URL."js/yop-poll-modal-functions.js", array( 'jquery', 'yop-poll-modal-box-js' ), $this->_config->version, true );
213
$yop_poll_modal_functions_config = array( 'ajax' => array( 'url' => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ), 'action' => 'yop_poll_modal_option_signup' ) );
214
wp_localize_script( 'yop-poll-modal-functions', 'yop_poll_modal_functions_config', $yop_poll_modal_functions_config );
215
$data['optin_box_modal_query'] = admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) );
@@ -217,43 +217,27 @@ class YOP_POLL_Poll_Admin extends YOP_POLL_Abstract_Admin {
217
$data['optin_box_modal_query'] = add_query_arg( 'action', 'yop_poll_show_optin_box_modal', $optin_box_modal_query );
218
wp_enqueue_script( 'link' );
219
wp_enqueue_script( 'xfn' );
220
- wp_enqueue_script( 'yop-poll-optin-form', "http://app.getresponse.com/view_webform.js?wid=394041&mg_param1=1", NULL, YOP_POLL_VERSION, true );
221
}
222
else{
223
- if($optin_box_modal_options['sidebar_had_submit'] == 'no'){
224
- $data['ok']=1;
225
- wp_enqueue_script( 'yop-poll-sidebar-option-functions', YOP_POLL_URL."js/yop-poll-sidebar-optin-functions.js", array( 'jquery' ), $this->_config->version, true );
226
- $yop_poll_sidebar_functions_config = array( 'ajax' => array( 'url' => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ), 'action' => 'yop_poll_sidebar_option_signup' ) );
227
- wp_localize_script( 'yop-poll-sidebar-option-functions', 'yop_poll_sidebar_functions_config', $yop_poll_sidebar_functions_config );
228
-
229
- wp_enqueue_style( 'yop-poll-view-poll-css', YOP_POLL_URL . 'css/polls/view-poll.css', array(), YOP_POLL_VERSION );
230
- wp_enqueue_style( 'yop-poll-donate-css', YOP_POLL_URL . 'css/yop-poll-donate.css', array(), YOP_POLL_VERSION );
231
- // wp_enqueue_style( 'yop-poll-optin2-css', YOP_POLL_URL . 'css/yop-poll-optin2.css', array(), YOP_POLL_VERSION );
232
- wp_enqueue_script( 'link' );
233
- wp_enqueue_script( 'xfn' );
234
- wp_enqueue_script( 'yop-poll-optin-form', "http://app.getresponse.com/view_webform.js?wid=394041&mg_param1=1", NULL, $this->_config->version, true );
235
- }
236
- }
237
-
238
- /* $optin_box_modal_options = get_option( 'yop_poll_optin_box_modal_options' );
239
- if ( $optin_box_modal_options == 'no' ){
240
- update_option( "yop_poll_optin_box_modal_options", 'no' );
241
-
242
- wp_enqueue_script( 'yop-poll-modal-functions', YOP_POLL_URL."js/yop-poll-modal-functions.js", array( 'jquery', 'jquery-ui-dialog' ), $this->_config->version, true );
243
- }
244
245
-
246
- wp_enqueue_script( 'yop-poll-sidebar-option-functions', YOP_POLL_URL."js/yop-poll-sidebar-optin-functions.js", array( 'jquery' ), $this->_config->version, true );
247
- $yop_poll_sidebar_functions_config = array( 'ajax' => array( 'url' => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ), 'action' => 'yop_poll_sidebar_option_signup' ) );
248
- wp_localize_script( 'yop-poll-sidebar-option-functions', 'yop_poll_sidebar_functions_config', $yop_poll_sidebar_functions_config );
249
-
250
-
251
- /* wp_enqueue_script( 'yop-poll-modal-box-js', YOP_POLL_URL."js/jquery.modalbox-1.5.0-min.js", array( 'jquery' ), $this->_config->version, true );
252
- wp_enqueue_script( 'yop-poll-modal-functions', YOP_POLL_URL."js/yop-poll-modal-functions.js", array( 'jquery', 'yop-poll-modal-box-js' ), $this->_config->version, true );
253
- $yop_poll_modal_functions_config = array( 'ajax' => array( 'url' => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ), 'action' => 'yop_poll_modal_option_signup' ) );
254
- wp_localize_script( 'yop-poll-modal-functions', 'yop_poll_modal_functions_config', $yop_poll_modal_functions_config );
255
- wp_enqueue_style( 'yop-poll-modal-box-css', YOP_POLL_URL."css/jquery.modalbox-basic.css", array(), $this->_config->version );
256
- wp_enqueue_style( 'yop-poll-modal-box-css', YOP_POLL_URL."css/jquery.modalbox-skin-precious-white.css", array(), $this->_config->version );*/
257
258
$per_page = ( isset( $_REQUEST ['per_page'] ) && intval( $_REQUEST ['per_page'] ) > 0 ) ? intval( $_REQUEST ['per_page'] ) : 100;
259
$page_no = ( isset( $_REQUEST ['page_no'] ) && intval( $_REQUEST ['page_no'] ) > 0 ) ? intval( $_REQUEST ['page_no'] ) : 1;
@@ -476,6 +460,7 @@ class YOP_POLL_Poll_Admin extends YOP_POLL_Abstract_Admin {
476
$data['message']['error'] = $message['error'];
477
foreach( $data['results'] as &$result ) {
478
$result['votes_details'] = json_decode( $result['result_details'], true );
479
foreach( $result['votes_details'] as $question ) {
480
$vote_answer = $question['question'] . ": ";
481
foreach( $question['answers'] as $answer ) {
@@ -610,7 +595,7 @@ class YOP_POLL_Poll_Admin extends YOP_POLL_Abstract_Admin {
610
}
611
612
613
- $question_detail[] = array( 'other_answer' => $question->other_answers_label, 'name' => $question->question, 'answers' => $question->answers, 'custom_fields' => self::get_poll_customfields( $data['poll_id'], $question->ID ), 'custom_fields_logs_details' => $custom_fields_logs_details, 'q_id' => $question->ID, 'total_custom_fields_logs' => $data['total_custom_fields_logs'], 'cf_pagination' => $data['cf_pagination'] );
614
$data['questions_details'] = $question_detail;
615
616
unset( $custom_fields_logs_details );
@@ -1171,7 +1156,6 @@ class YOP_POLL_Poll_Admin extends YOP_POLL_Abstract_Admin {
1171
ORDER BY " . esc_attr( $orderby ) . " " . esc_attr( $order ) . "
1172
LIMIT %d, %d
1173
", $poll_id, $quest_id, $offset, $per_page ), ARRAY_A );
1174
-
1175
return $result;
1176
}
1177
@@ -1183,337 +1167,14 @@ class YOP_POLL_Poll_Admin extends YOP_POLL_Abstract_Admin {
1183
return $wpdb->get_results( $wpdb->prepare( "
1184
", $start_date, $end_date . '%' ) );
1185
}
1186
-
1187
- /*private function view_results_votes() {
1188
- global $message;
1189
-
1190
- wp_enqueue_style( 'yop-poll-slider-css', YOP_POLL_URL . 'css/yop-poll-slider.css', array(), YOP_POLL_VERSION );
1191
-
1192
- wp_enqueue_script( 'yop-poll-add-edit-js', YOP_POLL_URL . 'js/polls/yop-poll-add-edit.js', array(
1193
- 'jquery',
1194
- 'jquery-ui-sortable',
1195
- 'jquery-ui-dialog',
1196
- ), YOP_POLL_VERSION, true );
1197
-
1198
- wp_enqueue_script( 'yop-poll-slider-js', YOP_POLL_URL . 'js/yop-poll-slider.js', array(
1199
- 'jquery',
1200
- 'jquery-ui-dialog'
1201
- ), YOP_POLL_VERSION, true );
1202
-
1203
- wp_enqueue_script( 'yop-poll-results-votes-js', YOP_POLL_URL . '/js/polls/yop-poll-results-votes.js', array(
1204
- 'jquery',
1205
- 'jquery-ui-dialog'
1206
- ), YOP_POLL_VERSION, true );
1207
- wp_enqueue_script( 'yop-poll-results-votes-js', YOP_POLL_URL . '/js/polls/yop-poll-results-votes.js', array(
1208
- 'jquery',
1209
- 'jquery-ui-resizable'
1210
- ), YOP_POLL_VERSION, true );
1211
- wp_enqueue_style( 'yop-poll-add-edit-css', YOP_POLL_URL . 'css/polls/add-edit.css', array(), YOP_POLL_VERSION );
1212
-
1213
- $data = array();
1214
- $data['poll_url']= YOP_POLL_URL;
1215
- $data['poll_id'] = $_REQUEST['id'];
1216
- $current_poll = new YOP_POLL_Poll_Model( $data['poll_id'] );
1217
- $data['poll_title'] = $current_poll->poll_name;
1218
- $data['per_page'] = ( isset( $_REQUEST ['per_page'] ) && intval( $_REQUEST ['per_page'] ) > 0 ) ? intval( $_REQUEST ['per_page'] ) : 100;
1219
- $data['page_no'] = ( isset( $_REQUEST ['page_no'] ) && intval( $_REQUEST ['page_no'] ) > 0 ) ? intval( $_REQUEST ['page_no'] ) : 1;
1220
- $orderby = ( empty ( $GLOBALS['orderby'] ) ) ? 'ip' : $GLOBALS['orderby'];
1221
- $order = ( empty ( $GLOBALS['order'] ) ) ? 'desc' : $GLOBALS['order'];
1222
- $data['request']['s_ip'] = ( isset ( $_REQUEST ['s_ip'] ) ? $_REQUEST ['s_ip'] : '' );
1223
- $order_fields = array(
1224
- 'vote_date',
1225
- 'user_type',
1226
- 'ip'
1227
- );
1228
-
1229
- $args = array(
1230
- 'poll_id' => $_REQUEST['id'],
1231
- 'return_fields' => 'COUNT(*) as total_results',
1232
- 'search' => array(
1233
- 'fields' => array( 'ip' ),
1234
- 'value' => isset ( $_REQUEST ['s_ip'] ) ? $_REQUEST ['s_ip'] : ''
1235
- ),
1236
- 'orderby' => $orderby,
1237
- 'order' => $order
1238
- );
1239
- $total_results = self::get_polls_results_filter_search( $args );
1240
- if( ! isset( $total_results[0]['total_results'] ) ) {
1241
- $total_results[0]['total_results'] = 0;
1242
- }
1243
- $data['total_results'] = $total_results[0]['total_results'];
1244
- $total_results_pages = ceil( $total_results[0]['total_results'] / $data['per_page'] );
1245
- if( intval( $data['page_no'] ) > intval( $total_results_pages ) ) {
1246
- $data['page_no'] = 1;
1247
- }
1248
- $args['limit'] = ( $data['page_no'] - 1 ) * $data['per_page'] . ', ' . $data['per_page'];
1249
- $args['return_fields'] = "*";
1250
- $data['REQUEST'] = $_REQUEST;
1251
- $data['orderby'] = $orderby;
1252
- $data['order'] = $order;
1253
- $data['order_direction'] = $this->make_order_array( $order_fields, 'asc', $orderby, ( 'desc' == $order ) ? 'asc' : 'desc' );
1254
- $data['order_sortable'] = $this->make_order_array( $order_fields, 'sortable', $orderby, 'sorted' );
1255
- $data['order_direction_reverse'] = $this->make_order_array( $order_fields, 'desc', $orderby, ( 'desc' == $order ) ? 'desc' : 'asc' );
1256
- $data['results'] = self::get_polls_results_for_view( $args );
1257
- $data['total_items'] = $total_results[0]['total_results'];
1258
- $data['current_user'] = $GLOBALS['current_user'];
1259
- $data['message']['success'] = $message['success'];
1260
- $data['message']['error'] = $message['error'];
1261
- $data['poll_details'] = array(
1262
- 'name' => $current_poll->poll_title,
1263
- 'question' => $current_poll->questions
1264
- );
1265
- foreach( $data['results'] as &$result ) {
1266
- $result['votes_details'] = json_decode( $result['result_details'], true );
1267
- foreach( $result['votes_details'] as $question ) {
1268
- $vote_answer = $question['question'] . ": ";
1269
- foreach( $question['answers'] as $answer ) {
1270
- $vote_answer .= $answer . ", ";
1271
- }
1272
- $result['vote_answers'] .= $vote_answer . ".\n";
1273
- $result['vote_answers']=str_replace(", .",".",$result['vote_answers']);
1274
- if( isset( $question['cf'] ) ) {
1275
- $custom_fields_details = "";
1276
- foreach( $question['cf'] as $cf_id ) {
1277
- $custom_field_log = self::get_custom_field_log_by_id( $cf_id );
1278
- $custom_field = self::get_custom_field_by_id( $custom_field_log[0]['custom_field_id'] );
1279
- if($custom_field_log[0]['custom_field_value'])
1280
- $custom_fields_details .= $custom_field[0]['custom_field'] . ": " . $custom_field_log[0]['custom_field_value'] . ".\n";
1281
-
1282
- }
1283
- $result['custom_fields'] = $custom_fields_details;
1284
- }
1285
- }
1286
- }
1287
- if( 'yes' == $data['soav'] ) {
1288
- $data['display_other_answers_values'] = true;
1289
- }
1290
- else {
1291
- $data['display_other_answers_values'] = false;
1292
- }
1293
- $percentages = array();
1294
- $total_votes = array();
1295
- $i = 0;
1296
- foreach( $current_poll->questions as $question ) {
1297
- $total_votes[$i] = 0;
1298
- foreach( $question->answers as $answer ) {
1299
- $total_votes[$i] += floatval( $answer->votes );
1300
- }
1301
- $i ++;
1302
- }
1303
- $i = 0;
1304
-
1305
- foreach( $current_poll->questions as $question ) {
1306
- foreach( $question->answers as $answer ) {
1307
- if( $answer->votes > 0 ) {
1308
- $answer->status = round( ( $answer->votes * 100 ) / $total_votes[$i], 1 );
1309
- }
1310
- else {
1311
- $percentages[$i][] = 0;
1312
- $answer->status = 0;
1313
-
1314
- }
1315
- }
1316
- $i ++;
1317
- }
1318
-
1319
-
1320
-
1321
- $data['cf_sdate'] = ( isset ( $_GET ['cf_sdate'] ) ? $_GET ['cf_sdate'] : '' );
1322
- $data['cf_edate'] = ( isset ( $_GET ['cf_edate'] ) ? $_GET ['cf_edate'] : '' );
1323
- $data['title'] = "Results";
1324
- $data['custom_fields'] = array();
1325
-
1326
- foreach( $current_poll->questions as $question ) {
1327
- $data['cf_per_page'] = ( isset ( $_REQUEST ['cf_per_page'] ) ? intval( $_REQUEST ['cf_per_page'] ) : 100 );
1328
- $data['cf_page_no'] = ( isset ( $_REQUEST ['cf_page_no'] ) ? ( int )$_REQUEST ['cf_page_no'] : 1 );
1329
-
1330
- $poll_custom_fields = self::get_poll_customfields( $data['poll_id'], $question->ID );
1331
- $custom_fields_logs = self::get_poll_customfields_logs( $data['poll_id'], $question->ID, 'vote_id', 'asc', ( $data['cf_page_no'] - 1 ) * $data['cf_per_page'], $data['cf_per_page'], $data['cf_sdate'], $data['cf_edate'] );
1332
- unset( $column_custom_fields_ids );
1333
- foreach( $poll_custom_fields as $custom_field ) {
1334
- $column_custom_fields_ids [] = $custom_field ['ID'];
1335
-
1336
- }
1337
- if( count( $custom_fields_logs ) > 0 ) {
1338
- foreach( $custom_fields_logs as &$logs ) {
1339
- foreach( $column_custom_fields_ids as $custom_field_id ) {
1340
- $vote_log_values = array();
1341
- $vote_logs = explode( '<#!,>', $logs ['vote_log'] );
1342
- if( count( $vote_logs ) > 0 ) {
1343
- foreach( $vote_logs as $vote_log ) {
1344
- $temp = explode( '<#!->', $vote_log );
1345
- $vote_log_values [$temp [1]] = stripslashes( $temp [0] );
1346
- }
1347
- }
1348
- }