WP-Polls - Version 2.50

Version Description

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-Polls
Version 2.50
Comparing to
See all releases

Code changes from version 2.40 to 2.50

polls-add.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -104,72 +104,8 @@ if(!empty($_POST['do'])) {
104
  $poll_noquestion = 2;
105
  $count = 0;
106
  ?>
107
- <script type="text/javascript">
108
- /* <![CDATA[*/
109
- function check_pollexpiry() {
110
- poll_expiry = document.getElementById("pollq_expiry_no").checked;
111
- if(poll_expiry) {
112
- document.getElementById("pollq_expiry").style.display = 'none';
113
- } else {
114
- document.getElementById("pollq_expiry").style.display = 'block';
115
- }
116
- }
117
- var count_poll_answer = <?php echo $poll_noquestion; ?>;
118
- function create_poll_answer() {
119
- // Create Elements
120
- var poll_tr = document.createElement("tr");
121
- var poll_td1 = document.createElement("th");
122
- var poll_td2 = document.createElement("td");
123
- var poll_answer = document.createElement("input");
124
- var poll_answer_count = document.createTextNode("<?php _e('Answer', 'wp-polls'); ?> " + (count_poll_answer+1));
125
- var poll_answer_bold = document.createElement("strong");
126
- var poll_option = document.createElement("option");
127
- var poll_option_text = document.createTextNode((count_poll_answer+1));
128
- count_poll_answer++;
129
- // Elements - Input
130
- poll_answer.setAttribute('type', "text");
131
- poll_answer.setAttribute('name', "polla_answers[]");
132
- poll_answer.setAttribute('size', "50");
133
- // Elements - Options
134
- poll_option.setAttribute('value', count_poll_answer);
135
- poll_option.setAttribute('id', "pollq-multiple-" + (count_poll_answer+1));
136
- // Elements - TD/TR
137
- poll_tr.setAttribute('id', "poll-answer-" + count_poll_answer);
138
- poll_td1.setAttribute('width', "20%");
139
- poll_td1.setAttribute('scope', "row");
140
- poll_td2.setAttribute('width', "80%");
141
- // Appending
142
- poll_tr.appendChild(poll_td1);
143
- poll_tr.appendChild(poll_td2);
144
- poll_answer_bold.appendChild(poll_answer_count);
145
- poll_td1.appendChild(poll_answer_bold);
146
- poll_td2.appendChild(poll_answer);
147
- poll_option.appendChild(poll_option_text);
148
- document.getElementById("poll_answers").appendChild(poll_tr);
149
- document.getElementById("pollq_multiple").appendChild(poll_option);
150
- }
151
- function remove_poll_answer() {
152
- if(count_poll_answer == 2) {
153
- alert("<?php _e('You need at least a minimum of 2 poll answers.', 'wp-polls'); ?>");
154
- } else {
155
- document.getElementById("poll_answers").removeChild(document.getElementById("poll-answer-" + count_poll_answer));
156
- document.getElementById("pollq_multiple").removeChild(document.getElementById("pollq-multiple-" + (count_poll_answer+1)));
157
- document.getElementById("pollq_multiple").value = count_poll_answer;
158
- count_poll_answer--;
159
- }
160
- }
161
- function check_pollq_multiple() {
162
- if(parseInt(document.getElementById("pollq_multiple_yes").value) == 1) {
163
- document.getElementById("pollq_multiple").disabled = false;
164
- } else {
165
- document.getElementById("pollq_multiple").value = 1;
166
- document.getElementById("pollq_multiple").disabled = true;
167
- }
168
- }
169
- /* ]]> */
170
- </script>
171
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade">'.stripslashes($text).'</div>'; } ?>
172
- <form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>" method="post">
173
  <div class="wrap">
174
  <div id="icon-wp-polls" class="icon32"><br /></div>
175
  <h2><?php _e('Add Poll', 'wp-polls'); ?></h2>
@@ -187,7 +123,7 @@ $count = 0;
187
  <tfoot>
188
  <tr>
189
  <td width="20%">&nbsp;</td>
190
- <td width="80%"><input type="button" value="<?php _e('Add Answer', 'wp-polls') ?>" onclick="create_poll_answer();" class="button" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="<?php _e('Remove Answer', 'wp-polls') ?>" onclick="remove_poll_answer();" class="button" /></td>
191
  </tr>
192
  </tfoot>
193
  <tbody id="poll_answers">
@@ -195,7 +131,7 @@ $count = 0;
195
  for($i = 1; $i <= $poll_noquestion; $i++) {
196
  echo "<tr id=\"poll-answer-$i\">\n";
197
  echo "<th width=\"20%\" scope=\"row\" valign=\"top\">".sprintf(__('Answer %s', 'wp-polls'), number_format_i18n($i))."</th>\n";
198
- echo "<td width=\"80%\"><input type=\"text\" size=\"50\" name=\"polla_answers[]\" /></td>\n";
199
  echo "</tr>\n";
200
  $count++;
201
  }
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
6
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
104
  $poll_noquestion = 2;
105
  $count = 0;
106
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade">'.stripslashes($text).'</div>'; } ?>
108
+ <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
109
  <div class="wrap">
110
  <div id="icon-wp-polls" class="icon32"><br /></div>
111
  <h2><?php _e('Add Poll', 'wp-polls'); ?></h2>
123
  <tfoot>
124
  <tr>
125
  <td width="20%">&nbsp;</td>
126
+ <td width="80%"><input type="button" value="<?php _e('Add Answer', 'wp-polls') ?>" onclick="add_poll_answer_add();" class="button" /></td>
127
  </tr>
128
  </tfoot>
129
  <tbody id="poll_answers">
131
  for($i = 1; $i <= $poll_noquestion; $i++) {
132
  echo "<tr id=\"poll-answer-$i\">\n";
133
  echo "<th width=\"20%\" scope=\"row\" valign=\"top\">".sprintf(__('Answer %s', 'wp-polls'), number_format_i18n($i))."</th>\n";
134
+ echo "<td width=\"80%\"><input type=\"text\" size=\"50\" maxlength=\"200\" name=\"polla_answers[]\" />&nbsp;&nbsp;&nbsp;<input type=\"button\" value=\"".__('Remove', 'wp-polls')."\" onclick=\"remove_poll_answer_add(".$i.");\" class=\"button\" /></td>\n";
135
  echo "</tr>\n";
136
  $count++;
137
  }
polls-admin-ajax.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
6
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
polls-admin-css.css CHANGED
@@ -1,8 +1,8 @@
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
5
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
5
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
polls-admin-js-packed.js DELETED
@@ -1 +0,0 @@
1
- eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('q 1=12 13(14);q e=0;q r=0;q x=0;4 A(){2.3(\'6\').7.8="f";B("C()",D)}4 C(){2.3("15").E(2.3("F-"+e))}4 16(a,b){G=g(b);9(G){e=a;1.h();1.5("i",17);1.5("o",a);1.j=\'k\';1.l=\'6\';1.m=A;1.n()}}4 H(){2.3(\'6\').7.8="f";2.3("I").s=J}4 18(a){t=g(a);9(t){9(2.3("u").K==L){1.h();1.5("i",19);1.5("u","M");1.j=\'k\';1.l=\'6\';1.m=H;1.n()}N{O(1a)}}}4 P(){2.3(\'6\').7.8="f";2.3("I").s=J;2.3("1b").7.8=\'y\';2.3("1c").7.8=\'f\'}4 1d(a,b){t=g(b);9(t){9(2.3("u").K==L){e=a;1.h();1.5("i",1e);1.5("u","M");1.5("o",a);1.j=\'k\';1.l=\'6\';1.m=P;1.n()}N{O(1f)}}}4 Q(){2.3(\'6\').7.8="f";B("R()",D);2.3(\'v\').s=(p(2.3(\'v\').s)-p(x));v=p(2.3(\'S\').z);T=p(2.3("1g-"+r).z);w=(v-T);9(w<0){w=0}2.3(\'S\').z=p(w)}4 R(){2.3("1h").E(2.3("F-1i-"+r))}4 1j(a,b,c,d){U=g(d);9(U){e=a;r=b;x=c;1.h();1.5("i",1k);1.5("o",a);1.5("1l",b);1.j=\'k\';1.l=\'6\';1.m=Q;1.n()}}4 V(){2.3(\'6\').7.8="f";2.3("W").7.8="y";2.3("X").7.8="Y"}4 1m(a,b){Z=g(b);9(Z){e=a;1.h();1.5("i",1n);1.5("o",a);1.j=\'k\';1.l=\'6\';1.m=V;1.n()}}4 10(){2.3(\'6\').7.8="f";2.3("W").7.8="Y";2.3("X").7.8="y"}4 1o(a,b){11=g(b);9(11){e=a;1.h();1.5("i",1p);1.5("o",a);1.j=\'k\';1.l=\'6\';1.m=10;1.n()}}',62,88,'|polls_admin|document|getElementById|function|setVar|message|style|display|if|||||global_poll_id|block|confirm|reset|do|method|POST|element|onCompletion|runAJAX|pollq_id|parseInt|var|global_poll_aid|innerHTML|delete_poll_logs_confirm|delete_logs_yes|poll_total_votes|poll_total_votes_new|global_poll_aid_votes|none|value|delete_poll_message|setTimeout|remove_poll|1000|removeChild|poll|delete_poll_confirm|delete_poll_logs_message|poll_logs|polls_admin_text_no_poll_logs|checked|true|yes|else|alert|delete_this_poll_logs_message|delete_poll_ans_message|remove_poll_ans|pollq_totalvotes|poll_answer_vote|delete_poll_ans_confirm|opening_poll_message|open_poll|close_poll|inline|open_poll_confirm|closing_poll_message|close_poll_confirm|new|sack|polls_admin_ajax_url|manage_polls|delete_poll|polls_admin_text_delete_poll|delete_poll_logs|polls_admin_text_delete_all_logs|polls_admin_text_checkbox_delete_all_logs|poll_logs_display|poll_logs_display_none|delete_this_poll_logs|polls_admin_text_delete_poll_logs|polls_admin_text_checkbox_delete_poll_logs|polla_votes|poll_answers|answer|delete_poll_ans|polls_admin_text_delete_poll_ans|polla_aid|opening_poll|polls_admin_text_open_poll|closing_poll|polls_admin_text_close_poll'.split('|'),0,{}))
 
polls-admin-js.dev.js ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ +----------------------------------------------------------------+
3
+ | |
4
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
5
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
6
+ | |
7
+ | File Written By: |
8
+ | - Lester "GaMerZ" Chan |
9
+ | - http://lesterchan.net |
10
+ | |
11
+ | File Information: |
12
+ | - Polls Admin Javascript File |
13
+ | - wp-content/plugins/wp-polls/polls-admin-js.js |
14
+ | |
15
+ +----------------------------------------------------------------+
16
+ */
17
+
18
+
19
+ var global_poll_id = 0;
20
+ var global_poll_aid = 0;
21
+ var global_poll_aid_votes = 0;
22
+ var count_poll_answer_new = 0;
23
+ var count_poll_answer = 3;
24
+
25
+ // Delete Poll
26
+ function delete_poll(poll_id, poll_confirm) {
27
+ delete_poll_confirm = confirm(poll_confirm);
28
+ if(delete_poll_confirm) {
29
+ global_poll_id = poll_id;
30
+ jQuery.ajax({type: 'POST', url: pollsAdminL10n.admin_ajax_url, data: 'do=' + pollsAdminL10n.text_delete_poll + '&pollq_id=' + poll_id, cache: false, success: function (data) {
31
+ jQuery('#message').html(data);
32
+ jQuery('#message').show();
33
+ jQuery('#poll-' + global_poll_id).remove();
34
+ }});
35
+ }
36
+ }
37
+
38
+ // Delete Poll Logs
39
+ function delete_poll_logs(poll_confirm) {
40
+ delete_poll_logs_confirm = confirm(poll_confirm);
41
+ if(delete_poll_logs_confirm) {
42
+ if(jQuery('#delete_logs_yes').is(':checked')) {
43
+ jQuery.ajax({type: 'POST', url: pollsAdminL10n.admin_ajax_url, data: 'do=' + pollsAdminL10n.text_delete_all_logs + '&delete_logs_yes=yes', cache: false, success: function (data) {
44
+ jQuery('#message').html(data);
45
+ jQuery('#message').show();
46
+ jQuery('#poll_logs').html(pollsAdminL10n.text_no_poll_logs);
47
+ }});
48
+ } else {
49
+ alert(pollsAdminL10n.text_checkbox_delete_all_logs);
50
+ }
51
+ }
52
+ }
53
+
54
+ // Delete Individual Poll Logs
55
+ function delete_this_poll_logs(poll_id, poll_confirm) {
56
+ delete_poll_logs_confirm = confirm(poll_confirm);
57
+ if(delete_poll_logs_confirm) {
58
+ if(jQuery('#delete_logs_yes').is(':checked')) {
59
+ global_poll_id = poll_id;
60
+ jQuery.ajax({type: 'POST', url: pollsAdminL10n.admin_ajax_url, data: 'do=' + pollsAdminL10n.text_delete_poll_logs + '&pollq_id=' + poll_id + '&delete_logs_yes=yes', cache: false, success: function (data) {
61
+ jQuery('#message').html(data);
62
+ jQuery('#message').show();
63
+ jQuery('#poll_logs').html(pollsAdminL10n.text_no_poll_logs);
64
+ jQuery('#poll_logs_display').hide();
65
+ jQuery('#poll_logs_display_none').show();
66
+ }});
67
+ } else {
68
+ alert(pollsAdminL10n.text_checkbox_delete_poll_logs);
69
+ }
70
+ }
71
+ }
72
+
73
+ // Delete Poll Answer
74
+ function delete_poll_ans(poll_id, poll_aid, poll_aid_vote, poll_confirm) {
75
+ delete_poll_ans_confirm = confirm(poll_confirm);
76
+ if(delete_poll_ans_confirm) {
77
+ global_poll_id = poll_id;
78
+ global_poll_aid = poll_aid;
79
+ global_poll_aid_votes = poll_aid_vote;
80
+ temp_vote_count = 0;
81
+ jQuery.ajax({type: 'POST', url: pollsAdminL10n.admin_ajax_url, data: 'do=' + pollsAdminL10n.text_delete_poll_ans + '&pollq_id=' + poll_id + '&polla_aid=' + poll_aid, cache: false, success: function (data) {
82
+ jQuery('#message').html(data);
83
+ jQuery('#message').show();
84
+ jQuery('#poll_total_votes').html((parseInt(jQuery('#poll_total_votes').html()) - parseInt(global_poll_aid_votes)));
85
+ jQuery('#pollq_totalvotes').val(temp_vote_count);
86
+ jQuery('#poll-answer-' + global_poll_aid).remove();
87
+ check_totalvotes();
88
+ reorder_answer_num();
89
+ }});
90
+ }
91
+ }
92
+
93
+ // Open Poll
94
+ function opening_poll(poll_id, poll_confirm) {
95
+ open_poll_confirm = confirm(poll_confirm);
96
+ if(open_poll_confirm) {
97
+ global_poll_id = poll_id;
98
+ jQuery.ajax({type: 'POST', url: pollsAdminL10n.admin_ajax_url, data: 'do=' + pollsAdminL10n.text_open_poll + '&pollq_id=' + poll_id, cache: false, success: function (data) {
99
+ jQuery('#message').html(data);
100
+ jQuery('#message').show();
101
+ jQuery('#open_poll').hide();
102
+ jQuery('#close_poll').show();
103
+ }});
104
+ }
105
+ }
106
+
107
+ // Close Poll
108
+ function closing_poll(poll_id, poll_confirm) {
109
+ close_poll_confirm = confirm(poll_confirm);
110
+ if(close_poll_confirm) {
111
+ global_poll_id = poll_id;
112
+ jQuery.ajax({type: 'POST', url: pollsAdminL10n.admin_ajax_url, data: 'do=' + pollsAdminL10n.text_close_poll + '&pollq_id=' + poll_id, cache: false, success: function (data) {
113
+ jQuery('#message').html(data);
114
+ jQuery('#message').show();
115
+ jQuery('#open_poll').show();
116
+ jQuery('#close_poll').hide();
117
+ }});
118
+ }
119
+ }
120
+
121
+ // Reoder Answer Answer
122
+ function reorder_answer_num() {
123
+ jQuery('#pollq_multiple').empty();
124
+ jQuery('#poll_answers tr > th').each(function (i) {
125
+ jQuery(this).text(pollsAdminL10n.text_answer + ' ' + (i+1));
126
+ jQuery('#pollq_multiple').append('<option value="' + (i+1) + '">' + (i+1) + '</option>');
127
+ });
128
+ }
129
+
130
+ // Calculate Total Votes
131
+ function check_totalvotes() {
132
+ temp_vote_count = 0;
133
+ jQuery('#poll_answers tr > td:last input').each(function (i) {
134
+ if(isNaN(jQuery(this).val())) {
135
+ temp_vote_count += 0;
136
+ } else {
137
+ temp_vote_count += parseInt(jQuery(this).val());
138
+ }
139
+ });
140
+ jQuery('#pollq_totalvotes').val(temp_vote_count);
141
+ }
142
+
143
+ // Add Poll's Answer In Add Poll Page
144
+ function add_poll_answer_add() {
145
+ jQuery('#poll_answers').append('<tr id="poll-answer-' + count_poll_answer + '"><th width="20%" scope="row" valign="top"></th><td width="80%"><input type="text" size="50" maxlength="200" name="polla_answers[]" />&nbsp;&nbsp;&nbsp;<input type="button" value="' + pollsAdminL10n.text_remove_poll_answer + '" onclick="remove_poll_answer_add(' + count_poll_answer + ');" class="button" /></td></tr>');
146
+ count_poll_answer++;
147
+ reorder_answer_num();
148
+ }
149
+
150
+ // Remove Poll's Answer in Add Poll Page
151
+ function remove_poll_answer_add(poll_answer_id) {
152
+ jQuery('#poll-answer-' + poll_answer_id).remove();
153
+ reorder_answer_num();
154
+ }
155
+
156
+ // Add Poll's Answer In Edit Poll Page
157
+ function add_poll_answer_edit() {
158
+ jQuery('#poll_answers').append('<tr id="poll-answer-new-' + count_poll_answer_new + '"><th width="20%" scope="row" valign="top"></th><td width="60%"><input type="text" size="50" maxlength="200" name="polla_answers_new[]" />&nbsp;&nbsp;&nbsp;<input type="button" value="' + pollsAdminL10n.text_remove_poll_answer + '" onclick="remove_poll_answer_edit(' + count_poll_answer_new + ');" class="button" /></td><td width="20%" align="' + pollsAdminL10n.text_direction + '">0 <input type="text" size="4" name="polla_answers_new_votes[]" value="0" onblur="check_totalvotes();" /></td></tr>');
159
+ count_poll_answer_new++;
160
+ reorder_answer_num();
161
+ }
162
+
163
+ // Remove Poll's Answer In Edit Poll Page
164
+ function remove_poll_answer_edit(poll_answer_new_id) {
165
+ jQuery('#poll-answer-new-' + poll_answer_new_id).remove();
166
+ check_totalvotes();
167
+ reorder_answer_num();
168
+ }
169
+
170
+ // Check Poll Whether It is Multiple Poll Answer
171
+ function check_pollq_multiple() {
172
+ if(parseInt(jQuery('#pollq_multiple_yes').val()) == 1) {
173
+ jQuery('#pollq_multiple').attr('disabled', false);
174
+ } else {
175
+ jQuery('#pollq_multiple').val(1);
176
+ jQuery('#pollq_multiple').attr('disabled', true);
177
+ }
178
+ }
179
+
180
+ // Show/Hide Poll's Timestamp
181
+ function check_polltimestamp() {
182
+ if(jQuery('#edit_polltimestamp').is(':checked')) {
183
+ jQuery('#pollq_timestamp').show();
184
+ } else {
185
+ jQuery('#pollq_timestamp').hide();
186
+ }
187
+ }
188
+
189
+ // Show/Hide Poll's Expiry Date
190
+ function check_pollexpiry() {
191
+ if(jQuery('#pollq_expiry_no').is(':checked')) {
192
+ jQuery('#pollq_expiry').hide();
193
+ } else {
194
+ jQuery('#pollq_expiry').show();
195
+ }
196
+ }
polls-admin-js.js CHANGED
@@ -1,181 +1 @@
1
- /*
2
- +----------------------------------------------------------------+
3
- | |
4
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
5
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
- | |
7
- | File Written By: |
8
- | - Lester "GaMerZ" Chan |
9
- | - http://lesterchan.net |
10
- | |
11
- | File Information: |
12
- | - Polls Admin Javascript File |
13
- | - wp-content/plugins/wp-polls/polls-admin-js.js |
14
- | |
15
- +----------------------------------------------------------------+
16
- */
17
-
18
-
19
- var polls_admin = new sack(polls_admin_ajax_url);
20
- var global_poll_id = 0;
21
- var global_poll_aid = 0;
22
- var global_poll_aid_votes = 0;
23
-
24
- // Function: Delete Poll Message
25
- function delete_poll_message() {
26
- document.getElementById('message').style.display = "block";
27
- setTimeout("remove_poll()", 1000);
28
- }
29
-
30
- // Function: Remove Poll From Manage Poll
31
- function remove_poll() {
32
- document.getElementById("manage_polls").removeChild(document.getElementById("poll-" + global_poll_id));
33
- }
34
-
35
- // Function: Delete Poll
36
- function delete_poll(poll_id, poll_confirm) {
37
- delete_poll_confirm = confirm(poll_confirm);
38
- if(delete_poll_confirm) {
39
- global_poll_id = poll_id;
40
- polls_admin.reset();
41
- polls_admin.setVar("do", polls_admin_text_delete_poll);
42
- polls_admin.setVar("pollq_id", poll_id);
43
- polls_admin.method = 'POST';
44
- polls_admin.element = 'message';
45
- polls_admin.onCompletion = delete_poll_message;
46
- polls_admin.runAJAX();
47
- }
48
- }
49
-
50
- // Function: Delete Poll Logs Message
51
- function delete_poll_logs_message() {
52
- document.getElementById('message').style.display = "block";
53
- document.getElementById("poll_logs").innerHTML = polls_admin_text_no_poll_logs;
54
- }
55
-
56
- // Function: Delete Poll Logs
57
- function delete_poll_logs(poll_confirm) {
58
- delete_poll_logs_confirm = confirm(poll_confirm);
59
- if(delete_poll_logs_confirm) {
60
- if(document.getElementById("delete_logs_yes").checked == true) {
61
- polls_admin.reset();
62
- polls_admin.setVar("do", polls_admin_text_delete_all_logs);
63
- polls_admin.setVar("delete_logs_yes", "yes");
64
- polls_admin.method = 'POST';
65
- polls_admin.element = 'message';
66
- polls_admin.onCompletion = delete_poll_logs_message;
67
- polls_admin.runAJAX();
68
- } else {
69
- alert(polls_admin_text_checkbox_delete_all_logs);
70
- }
71
- }
72
- }
73
-
74
- // Function: Delete Individual Poll Logs Message
75
- function delete_this_poll_logs_message() {
76
- document.getElementById('message').style.display = "block";
77
- document.getElementById("poll_logs").innerHTML = polls_admin_text_no_poll_logs;
78
- document.getElementById("poll_logs_display").style.display = 'none';
79
- document.getElementById("poll_logs_display_none").style.display = 'block';
80
- }
81
-
82
- // Function: Delete Individual Poll Logs
83
- function delete_this_poll_logs(poll_id, poll_confirm) {
84
- delete_poll_logs_confirm = confirm(poll_confirm);
85
- if(delete_poll_logs_confirm) {
86
- if(document.getElementById("delete_logs_yes").checked == true) {
87
- global_poll_id = poll_id;
88
- polls_admin.reset();
89
- polls_admin.setVar("do", polls_admin_text_delete_poll_logs);
90
- polls_admin.setVar("delete_logs_yes", "yes");
91
- polls_admin.setVar("pollq_id", poll_id);
92
- polls_admin.method = 'POST';
93
- polls_admin.element = 'message';
94
- polls_admin.onCompletion = delete_this_poll_logs_message;
95
- polls_admin.runAJAX();
96
- } else {
97
- alert(polls_admin_text_checkbox_delete_poll_logs);
98
- }
99
- }
100
- }
101
-
102
- // Function: Delete Poll Answer Message
103
- function delete_poll_ans_message() {
104
- document.getElementById('message').style.display = "block";
105
- setTimeout("remove_poll_ans()", 1000);
106
- document.getElementById('poll_total_votes').innerHTML = (parseInt(document.getElementById('poll_total_votes').innerHTML) - parseInt(global_poll_aid_votes));
107
- poll_total_votes = parseInt(document.getElementById('pollq_totalvotes').value);
108
- poll_answer_vote = parseInt(document.getElementById("polla_votes-" + global_poll_aid).value);
109
- poll_total_votes_new = (poll_total_votes - poll_answer_vote);
110
- if(poll_total_votes_new < 0) {
111
- poll_total_votes_new = 0;
112
- }
113
- document.getElementById('pollq_totalvotes').value = parseInt(poll_total_votes_new);
114
- }
115
-
116
- // Function: Remove Poll From Manage Poll
117
- function remove_poll_ans() {
118
- document.getElementById("poll_answers").removeChild(document.getElementById("poll-answer-" + global_poll_aid));
119
- }
120
-
121
- // Function: Delete Poll Answer
122
- function delete_poll_ans(poll_id, poll_aid, poll_aid_vote, poll_confirm) {
123
- delete_poll_ans_confirm = confirm(poll_confirm);
124
- if(delete_poll_ans_confirm) {
125
- global_poll_id = poll_id;
126
- global_poll_aid = poll_aid;
127
- global_poll_aid_votes = poll_aid_vote;
128
- polls_admin.reset();
129
- polls_admin.setVar("do", polls_admin_text_delete_poll_ans);
130
- polls_admin.setVar("pollq_id", poll_id);
131
- polls_admin.setVar("polla_aid", poll_aid);
132
- polls_admin.method = 'POST';
133
- polls_admin.element = 'message';
134
- polls_admin.onCompletion = delete_poll_ans_message;
135
- polls_admin.runAJAX();
136
- }
137
- }
138
-
139
- // Function: Open Poll Message
140
- function opening_poll_message() {
141
- document.getElementById('message').style.display = "block";
142
- document.getElementById("open_poll").style.display = "none";
143
- document.getElementById("close_poll").style.display = "inline";
144
- }
145
-
146
- // Function: Open Poll
147
- function opening_poll(poll_id, poll_confirm) {
148
- open_poll_confirm = confirm(poll_confirm);
149
- if(open_poll_confirm) {
150
- global_poll_id = poll_id;
151
- polls_admin.reset();
152
- polls_admin.setVar("do", polls_admin_text_open_poll);
153
- polls_admin.setVar("pollq_id", poll_id);
154
- polls_admin.method = 'POST';
155
- polls_admin.element = 'message';
156
- polls_admin.onCompletion = opening_poll_message;
157
- polls_admin.runAJAX();
158
- }
159
- }
160
-
161
- // Function: Close Poll Message
162
- function closing_poll_message() {
163
- document.getElementById('message').style.display = "block";
164
- document.getElementById("open_poll").style.display = "inline";
165
- document.getElementById("close_poll").style.display = "none";
166
- }
167
-
168
- // Function: Close Poll
169
- function closing_poll(poll_id, poll_confirm) {
170
- close_poll_confirm = confirm(poll_confirm);
171
- if(close_poll_confirm) {
172
- global_poll_id = poll_id;
173
- polls_admin.reset();
174
- polls_admin.setVar("do", polls_admin_text_close_poll);
175
- polls_admin.setVar("pollq_id", poll_id);
176
- polls_admin.method = 'POST';
177
- polls_admin.element = 'message';
178
- polls_admin.onCompletion = closing_poll_message;
179
- polls_admin.runAJAX();
180
- }
181
- }
1
+ var global_poll_id=0;var global_poll_aid=0;var global_poll_aid_votes=0;var count_poll_answer_new=0;var count_poll_answer=3;function delete_poll(a,b){delete_poll_confirm=confirm(b);if(delete_poll_confirm){global_poll_id=a;jQuery.ajax({type:"POST",url:pollsAdminL10n.admin_ajax_url,data:"do="+pollsAdminL10n.text_delete_poll+"&pollq_id="+a,cache:false,success:function(c){jQuery("#message").html(c);jQuery("#message").show();jQuery("#poll-"+global_poll_id).remove()}})}}function delete_poll_logs(a){delete_poll_logs_confirm=confirm(a);if(delete_poll_logs_confirm){if(jQuery("#delete_logs_yes").is(":checked")){jQuery.ajax({type:"POST",url:pollsAdminL10n.admin_ajax_url,data:"do="+pollsAdminL10n.text_delete_all_logs+"&delete_logs_yes=yes",cache:false,success:function(b){jQuery("#message").html(b);jQuery("#message").show();jQuery("#poll_logs").html(pollsAdminL10n.text_no_poll_logs)}})}else{alert(pollsAdminL10n.text_checkbox_delete_all_logs)}}}function delete_this_poll_logs(a,b){delete_poll_logs_confirm=confirm(b);if(delete_poll_logs_confirm){if(jQuery("#delete_logs_yes").is(":checked")){global_poll_id=a;jQuery.ajax({type:"POST",url:pollsAdminL10n.admin_ajax_url,data:"do="+pollsAdminL10n.text_delete_poll_logs+"&pollq_id="+a+"&delete_logs_yes=yes",cache:false,success:function(c){jQuery("#message").html(c);jQuery("#message").show();jQuery("#poll_logs").html(pollsAdminL10n.text_no_poll_logs);jQuery("#poll_logs_display").hide();jQuery("#poll_logs_display_none").show()}})}else{alert(pollsAdminL10n.text_checkbox_delete_poll_logs)}}}function delete_poll_ans(b,c,a,d){delete_poll_ans_confirm=confirm(d);if(delete_poll_ans_confirm){global_poll_id=b;global_poll_aid=c;global_poll_aid_votes=a;temp_vote_count=0;jQuery.ajax({type:"POST",url:pollsAdminL10n.admin_ajax_url,data:"do="+pollsAdminL10n.text_delete_poll_ans+"&pollq_id="+b+"&polla_aid="+c,cache:false,success:function(e){jQuery("#message").html(e);jQuery("#message").show();jQuery("#poll_total_votes").html((parseInt(jQuery("#poll_total_votes").html())-parseInt(global_poll_aid_votes)));jQuery("#pollq_totalvotes").val(temp_vote_count);jQuery("#poll-answer-"+global_poll_aid).remove();check_totalvotes();reorder_answer_num()}})}}function opening_poll(a,b){open_poll_confirm=confirm(b);if(open_poll_confirm){global_poll_id=a;jQuery.ajax({type:"POST",url:pollsAdminL10n.admin_ajax_url,data:"do="+pollsAdminL10n.text_open_poll+"&pollq_id="+a,cache:false,success:function(c){jQuery("#message").html(c);jQuery("#message").show();jQuery("#open_poll").hide();jQuery("#close_poll").show()}})}}function closing_poll(a,b){close_poll_confirm=confirm(b);if(close_poll_confirm){global_poll_id=a;jQuery.ajax({type:"POST",url:pollsAdminL10n.admin_ajax_url,data:"do="+pollsAdminL10n.text_close_poll+"&pollq_id="+a,cache:false,success:function(c){jQuery("#message").html(c);jQuery("#message").show();jQuery("#open_poll").show();jQuery("#close_poll").hide()}})}}function reorder_answer_num(){jQuery("#pollq_multiple").empty();jQuery("#poll_answers tr > th").each(function(a){jQuery(this).text(pollsAdminL10n.text_answer+" "+(a+1));jQuery("#pollq_multiple").append('<option value="'+(a+1)+'">'+(a+1)+"</option>")})}function check_totalvotes(){temp_vote_count=0;jQuery("#poll_answers tr > td:last input").each(function(a){if(isNaN(jQuery(this).val())){temp_vote_count+=0}else{temp_vote_count+=parseInt(jQuery(this).val())}});jQuery("#pollq_totalvotes").val(temp_vote_count)}function add_poll_answer_add(){jQuery("#poll_answers").append('<tr id="poll-answer-'+count_poll_answer+'"><th width="20%" scope="row" valign="top"></th><td width="80%"><input type="text" size="50" maxlength="200" name="polla_answers[]" />&nbsp;&nbsp;&nbsp;<input type="button" value="'+pollsAdminL10n.text_remove_poll_answer+'" onclick="remove_poll_answer_add('+count_poll_answer+');" class="button" /></td></tr>');count_poll_answer++;reorder_answer_num()}function remove_poll_answer_add(a){jQuery("#poll-answer-"+a).remove();reorder_answer_num()}function add_poll_answer_edit(){jQuery("#poll_answers").append('<tr id="poll-answer-new-'+count_poll_answer_new+'"><th width="20%" scope="row" valign="top"></th><td width="60%"><input type="text" size="50" maxlength="200" name="polla_answers_new[]" />&nbsp;&nbsp;&nbsp;<input type="button" value="'+pollsAdminL10n.text_remove_poll_answer+'" onclick="remove_poll_answer_edit('+count_poll_answer_new+');" class="button" /></td><td width="20%" align="'+pollsAdminL10n.text_direction+'">0 <input type="text" size="4" name="polla_answers_new_votes[]" value="0" onblur="check_totalvotes();" /></td></tr>');count_poll_answer_new++;reorder_answer_num()}function remove_poll_answer_edit(a){jQuery("#poll-answer-new-"+a).remove();check_totalvotes();reorder_answer_num()}function check_pollq_multiple(){if(parseInt(jQuery("#pollq_multiple_yes").val())==1){jQuery("#pollq_multiple").attr("disabled",false)}else{jQuery("#pollq_multiple").val(1);jQuery("#pollq_multiple").attr("disabled",true)}}function check_polltimestamp(){if(jQuery("#edit_polltimestamp").is(":checked")){jQuery("#pollq_timestamp").show()}else{jQuery("#pollq_timestamp").hide()}}function check_pollexpiry(){if(jQuery("#pollq_expiry_no").is(":checked")){jQuery("#pollq_expiry").hide()}else{jQuery("#pollq_expiry").show()}};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
polls-css-rtl.css CHANGED
@@ -1,8 +1,8 @@
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
5
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
5
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
polls-css.css CHANGED
@@ -1,8 +1,8 @@
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
5
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
@@ -30,6 +30,7 @@
30
  .wp-polls ul, .wp-polls-ul, .wp-polls-ans ul {
31
  text-align: left;
32
  list-style: none;
 
33
  }
34
  .wp-polls ul li:before, wp-polls-ul li, .wp-polls-ans ul li:before, #sidebar ul ul li:before {
35
  content: '';
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
5
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
30
  .wp-polls ul, .wp-polls-ul, .wp-polls-ans ul {
31
  text-align: left;
32
  list-style: none;
33
+ float: none;
34
  }
35
  .wp-polls ul li:before, wp-polls-ul li, .wp-polls-ans ul li:before, #sidebar ul ul li:before {
36
  content: '';
polls-js-packed.js DELETED
@@ -1 +0,0 @@
1
- eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h 3=Z 11(12);h 6=0;h c="";h b=0;h 5=8;h n=(7.O&&7.9);h o=(!7.O&&7.9);h p=(13.14.15("16")>-1);h d=q;f 17(a){2(!d){d=r;6=a;s=7.9(\'P\'+6);k=18("s.Q"+6);c="";2(7.9(\'R\'+6)){l=S(7.9(\'R\'+6).y)}4{l=0}t=0;2(k.z!=19){T(i=0;i<k.z;i++){2(k[i].1a){2(l>0){c=k[i].y+","+c;t++}4{c=S(k[i].y)}}}}4{c=k.y}2(l>0){2(t>0&&t<=l){c=c.1b(0,(c.z-1));u();A()}4 2(t==0){d=q;m(U)}4{d=q;m(1c+" "+l+".")}}4{2(c>0){u();A()}4{d=q;m(U)}}}4{m(G)}}f 1d(a){2(!d){d=r;6=a;u();H()}4{m(G)}}f 1e(a){2(!d){d=r;6=a;u();I()}4{m(G)}}f v(){2(b==1f){w()}2(b<8){b+=10;2(p){b=8;w()}4 2(n){2(j){7.9(\'3-\'+6+\'-e\').g.B=\'C(D=\'+b+\')\'}4{b=8;w()}}4 2(o){2(j){7.9(\'3-\'+6+\'-e\').g.E=(b/8)}4{b=8;w()}}F("v()",8)}4{b=8;d=q}}f u(){2(V){7.9(\'3-\'+6+\'-W\').g.X=\'1g\'}}f w(){2(V){7.9(\'3-\'+6+\'-W\').g.X=\'1h\'}}f A(){2(5>0){5-=10;2(p){5=0}4 2(n){2(j){7.9(\'3-\'+6+\'-e\').g.B=\'C(D=\'+5+\')\'}4{5=0}}4 2(o){2(j){7.9(\'3-\'+6+\'-e\').g.E=(5/8)}4{5=0}}F("A()",8)}4{5=0;3.J();3.x("1i",r);3.x("6",6);3.x("Q"+6,c);3.K=\'1j\';3.L=\'3-\'+6+\'-e\';3.M=v;3.N();b=0;5=8}}f H(){2(5>0){5-=10;2(p){5=0}4 2(n){2(j){7.9(\'3-\'+6+\'-e\').g.B=\'C(D=\'+5+\')\'}4{5=0}}4 2(o){2(j){7.9(\'3-\'+6+\'-e\').g.E=(5/8)}4{5=0}}F("H()",8)}4{5=0;3.J();3.x("1k",6);3.K=\'Y\';3.L=\'3-\'+6+\'-e\';3.M=v;3.N();b=0;5=8}}f I(){2(5>0){5-=10;2(p){5=0}4 2(n){2(j){7.9(\'3-\'+6+\'-e\').g.B=\'C(D=\'+5+\')\'}4{5=0}}4 2(o){2(j){7.9(\'3-\'+6+\'-e\').g.E=(5/8)}4{5=0}}F("I()",8)}4{5=0;3.J();3.x("1l",6);3.K=\'Y\';3.L=\'3-\'+6+\'-e\';3.M=v;3.N();b=0;5=8}}f 1m(a){s=7.9(\'P\'+a);T(i=0;i<s.z;i++){s[i].1n=r}}',62,86,'||if|polls|else|poll_fadeout_opacity|poll_id|document|100|getElementById||poll_fadein_opacity|poll_answer_id|is_being_voted|ans|function|style|var||poll_show_fading|poll_answer|poll_multiple_ans|alert|is_ie|is_moz|is_opera|false|true|poll_form|poll_multiple_ans_count|poll_loading_text|poll_fadein_text|poll_unloading_text|setVar|value|length|poll_process|filter|alpha|opacity|MozOpacity|setTimeout|polls_text_wait|poll_process_result|poll_process_booth|reset|method|element|onCompletion|runAJAX|all|polls_form_|poll_|poll_multiple_ans_|parseInt|for|polls_text_valid|poll_show_loading|loading|display|GET|new||sack|polls_ajax_url|navigator|userAgent|indexOf|Opera|poll_vote|eval|null|checked|substring|polls_text_multiple|poll_result|poll_booth|90|block|none|vote|POST|pollresult|pollbooth|poll_disable_voting|disabled'.split('|'),0,{}))
 
polls-js.dev.js ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ +----------------------------------------------------------------+
3
+ | |
4
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
5
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
6
+ | |
7
+ | File Written By: |
8
+ | - Lester "GaMerZ" Chan |
9
+ | - http://lesterchan.net |
10
+ | |
11
+ | File Information: |
12
+ | - Polls Javascript File |
13
+ | - wp-content/plugins/wp-polls/polls-js.js |
14
+ | |
15
+ +----------------------------------------------------------------+
16
+ */
17
+
18
+
19
+ // Variables
20
+ var poll_id = 0;
21
+ var poll_answer_id = '';
22
+ var is_being_voted = false;
23
+ pollsL10n.show_loading = parseInt(pollsL10n.show_loading);
24
+ pollsL10n.show_fading = parseInt(pollsL10n.show_fading);
25
+
26
+ // When User Vote For Poll
27
+ function poll_vote(current_poll_id) {
28
+ if(!is_being_voted) {
29
+ set_is_being_voted(true);
30
+ poll_id = current_poll_id;
31
+ poll_answer_id = '';
32
+ poll_multiple_ans = 0;
33
+ poll_multiple_ans_count = 0;
34
+ if(jQuery('#poll_multiple_ans_' + poll_id).length) {
35
+ poll_multiple_ans = parseInt(jQuery('#poll_multiple_ans_' + poll_id).val());
36
+ }
37
+ jQuery('#polls_form_' + poll_id + ' :checkbox, #polls_form_' + poll_id + ' :radio').each(function(i){
38
+ if (jQuery(this).is(':checked')) {
39
+ if(poll_multiple_ans > 0) {
40
+ poll_answer_id = jQuery(this).val() + ',' + poll_answer_id;
41
+ poll_multiple_ans_count++;
42
+ } else {
43
+ poll_answer_id = parseInt(jQuery(this).val());
44
+ }
45
+ }
46
+ });
47
+ if(poll_multiple_ans > 0) {
48
+ if(poll_multiple_ans_count > 0 && poll_multiple_ans_count <= poll_multiple_ans) {
49
+ poll_answer_id = poll_answer_id.substring(0, (poll_answer_id.length-1));
50
+ poll_process();
51
+ } else if(poll_multiple_ans_count == 0) {
52
+ set_is_being_voted(false);
53
+ alert(pollsL10n.text_valid);
54
+ } else {
55
+ set_is_being_voted(false);
56
+ alert(pollsL10n.text_multiple + ' ' + poll_multiple_ans);
57
+ }
58
+ } else {
59
+ if(poll_answer_id > 0) {
60
+ poll_process();
61
+ } else {
62
+ set_is_being_voted(false);
63
+ alert(pollsL10n.text_valid);
64
+ }
65
+ }
66
+ } else {
67
+ alert(pollsL10n.text_wait);
68
+ }
69
+ }
70
+
71
+ // Process Poll (User Click "Vote" Button)
72
+ function poll_process() {
73
+ if(pollsL10n.show_fading) {
74
+ jQuery('#polls-' + poll_id).fadeTo('def', 0, function () {
75
+ if(pollsL10n.show_loading) {
76
+ jQuery('#polls-' + poll_id + '-loading').show();
77
+ }
78
+ jQuery.ajax({type: 'POST', url: pollsL10n.ajax_url, data: 'vote=true&poll_id=' + poll_id + '&poll_' + poll_id + '=' + poll_answer_id, cache: false, success: poll_process_success});
79
+ });
80
+ } else {
81
+ if(pollsL10n.show_loading) {
82
+ jQuery('#polls-' + poll_id + '-loading').show();
83
+ }
84
+ jQuery.ajax({type: 'POST', url: pollsL10n.ajax_url, data: 'vote=true&poll_id=' + poll_id + '&poll_' + poll_id + '=' + poll_answer_id, cache: false, success: poll_process_success});
85
+ }
86
+ }
87
+
88
+ // Poll's Result (User Click "View Results" Link)
89
+ function poll_result(current_poll_id) {
90
+ if(!is_being_voted) {
91
+ set_is_being_voted(true);
92
+ poll_id = current_poll_id;
93
+ if(pollsL10n.show_fading) {
94
+ jQuery('#polls-' + poll_id).fadeTo('def', 0, function () {
95
+ if(pollsL10n.show_loading) {
96
+ jQuery('#polls-' + poll_id + '-loading').show();
97
+ }
98
+ jQuery.ajax({type: 'GET', url: pollsL10n.ajax_url, data: 'pollresult=' + poll_id, cache: false, success: poll_process_success});
99
+ });
100
+ } else {
101
+ if(pollsL10n.show_loading) {
102
+ jQuery('#polls-' + poll_id + '-loading').show();
103
+ }
104
+ jQuery.ajax({type: 'GET', url: pollsL10n.ajax_url, data: 'pollresult=' + poll_id, cache: false, success: poll_process_success});
105
+ }
106
+ } else {
107
+ alert(pollsL10n.text_wait);
108
+ }
109
+ }
110
+
111
+ // Poll's Voting Booth (User Click "Vote" Link)
112
+ function poll_booth(current_poll_id) {
113
+ if(!is_being_voted) {
114
+ set_is_being_voted(true);
115
+ poll_id = current_poll_id;
116
+ if(pollsL10n.show_fading) {
117
+ jQuery('#polls-' + poll_id).fadeTo('def', 0, function () {
118
+ if(pollsL10n.show_loading) {
119
+ jQuery('#polls-' + poll_id + '-loading').show();
120
+ }
121
+ jQuery.ajax({type: 'GET', url: pollsL10n.ajax_url, data: 'pollbooth=' + poll_id, cache: false, success: poll_process_success});
122
+ });
123
+ } else {
124
+ if(pollsL10n.show_loading) {
125
+ jQuery('#polls-' + poll_id + '-loading').show();
126
+ }
127
+ jQuery.ajax({type: 'GET', url: pollsL10n.ajax_url, data: 'pollbooth=' + poll_id, cache: false, success: poll_process_success});
128
+ }
129
+ } else {
130
+ alert(pollsL10n.text_wait);
131
+ }
132
+ }
133
+
134
+ // Poll Process Successfully
135
+ function poll_process_success(data) {
136
+ jQuery('#polls-' + poll_id).html(data);
137
+ if(pollsL10n.show_loading) {
138
+ jQuery('#polls-' + poll_id + '-loading').hide();
139
+ }
140
+ if(pollsL10n.show_fading) {
141
+ jQuery('#polls-' + poll_id).fadeTo('def', 1, function () {
142
+ set_is_being_voted(false);
143
+ });
144
+ } else {
145
+ set_is_being_voted(false);
146
+ }
147
+ }
148
+
149
+ // Set is_being_voted Status
150
+ function set_is_being_voted(voted_status) {
151
+ is_being_voted = voted_status;
152
+ }
polls-js.js CHANGED
@@ -1,261 +1 @@
1
- /*
2
- +----------------------------------------------------------------+
3
- | |
4
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
5
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
- | |
7
- | File Written By: |
8
- | - Lester "GaMerZ" Chan |
9
- | - http://lesterchan.net |
10
- | |
11
- | File Information: |
12
- | - Polls Javascript File |
13
- | - wp-content/plugins/wp-polls/polls-js.js |
14
- | |
15
- +----------------------------------------------------------------+
16
- */
17
-
18
-
19
- // Variables
20
- var polls = new sack(polls_ajax_url);
21
- var poll_id = 0;
22
- var poll_answer_id = "";
23
- var poll_fadein_opacity = 0;
24
- var poll_fadeout_opacity = 100;
25
- var is_ie = (document.all && document.getElementById);
26
- var is_moz = (!document.all && document.getElementById);
27
- var is_opera = (navigator.userAgent.indexOf("Opera") > -1);
28
- var is_being_voted = false;
29
-
30
- // Function: When User Vote For Poll
31
- function poll_vote(current_poll_id) {
32
- if(!is_being_voted) {
33
- is_being_voted = true;
34
- poll_id = current_poll_id;
35
- poll_form = document.getElementById('polls_form_' + poll_id);
36
- poll_answer = eval("poll_form.poll_" + poll_id);
37
- poll_answer_id = "";
38
- if(document.getElementById('poll_multiple_ans_' + poll_id)) {
39
- poll_multiple_ans = parseInt(document.getElementById('poll_multiple_ans_' + poll_id).value);
40
- } else {
41
- poll_multiple_ans = 0;
42
- }
43
- poll_multiple_ans_count = 0;
44
- if(poll_answer.length != null) {
45
- for(i = 0; i < poll_answer.length; i++) {
46
- if (poll_answer[i].checked) {
47
- if(poll_multiple_ans > 0) {
48
- poll_answer_id = poll_answer[i].value + "," + poll_answer_id;
49
- poll_multiple_ans_count++;
50
- } else {
51
- poll_answer_id = parseInt(poll_answer[i].value);
52
- }
53
- }
54
- }
55
- } else {
56
- poll_answer_id = poll_answer.value;
57
- }
58
- if(poll_multiple_ans > 0) {
59
- if(poll_multiple_ans_count > 0 && poll_multiple_ans_count <= poll_multiple_ans) {
60
- poll_answer_id = poll_answer_id.substring(0, (poll_answer_id.length-1));
61
- poll_loading_text();
62
- poll_process();
63
- } else if(poll_multiple_ans_count == 0) {
64
- is_being_voted = false;
65
- alert(polls_text_valid);
66
- } else {
67
- is_being_voted = false;
68
- alert(polls_text_multiple + " " + poll_multiple_ans + ".");
69
- }
70
- } else {
71
- if(poll_answer_id > 0) {
72
- poll_loading_text();
73
- poll_process();
74
- } else {
75
- is_being_voted = false;
76
- alert(polls_text_valid);
77
- }
78
- }
79
- } else {
80
- alert(polls_text_wait);
81
- }
82
- }
83
-
84
- // Function: When User View Poll's Result
85
- function poll_result(current_poll_id) {
86
- if(!is_being_voted) {
87
- is_being_voted = true;
88
- poll_id = current_poll_id;
89
- poll_loading_text();
90
- poll_process_result();
91
- } else {
92
- alert(polls_text_wait);
93
- }
94
- }
95
-
96
- // Function: When User View Poll's Voting Booth
97
- function poll_booth(current_poll_id) {
98
- if(!is_being_voted) {
99
- is_being_voted = true;
100
- poll_id = current_poll_id;
101
- poll_loading_text();
102
- poll_process_booth();
103
- } else {
104
- alert(polls_text_wait);
105
- }
106
- }
107
-
108
- // Function: Poll Fade In Text
109
- function poll_fadein_text() {
110
- if(poll_fadein_opacity == 90) {
111
- poll_unloading_text();
112
- }
113
- if(poll_fadein_opacity < 100) {
114
- poll_fadein_opacity += 10;
115
- if(is_opera) {
116
- poll_fadein_opacity = 100;
117
- poll_unloading_text();
118
- } else if(is_ie) {
119
- if(poll_show_fading) {
120
- document.getElementById('polls-' + poll_id + '-ans').style.filter = 'alpha(opacity=' + poll_fadein_opacity + ')';
121
- } else {
122
- poll_fadein_opacity = 100;
123
- poll_unloading_text();
124
- }
125
- } else if(is_moz) {
126
- if(poll_show_fading) {
127
- document.getElementById('polls-' + poll_id + '-ans').style.MozOpacity = (poll_fadein_opacity/100);
128
- } else {
129
- poll_fadein_opacity = 100;
130
- poll_unloading_text();
131
- }
132
- }
133
- setTimeout("poll_fadein_text()", 100);
134
- } else {
135
- poll_fadein_opacity = 100;
136
- is_being_voted = false;
137
- }
138
- }
139
-
140
- // Function: Poll Loading Text
141
- function poll_loading_text() {
142
- if(poll_show_loading) {
143
- document.getElementById('polls-' + poll_id + '-loading').style.display = 'block';
144
- }
145
- }
146
-
147
- // Function: Poll Finish Loading Text
148
- function poll_unloading_text() {
149
- if(poll_show_loading) {
150
- document.getElementById('polls-' + poll_id + '-loading').style.display = 'none';
151
- }
152
- }
153
-
154
- // Function: Process The Poll
155
- function poll_process() {
156
- if(poll_fadeout_opacity > 0) {
157
- poll_fadeout_opacity -= 10;
158
- if(is_opera) {
159
- poll_fadeout_opacity = 0;
160
- } else if(is_ie) {
161
- if(poll_show_fading) {
162
- document.getElementById('polls-' + poll_id + '-ans').style.filter = 'alpha(opacity=' + poll_fadeout_opacity + ')';
163
- } else {
164
- poll_fadeout_opacity = 0;
165
- }
166
- } else if(is_moz) {
167
- if(poll_show_fading) {
168
- document.getElementById('polls-' + poll_id + '-ans').style.MozOpacity = (poll_fadeout_opacity/100);
169
- } else {
170
- poll_fadeout_opacity = 0;
171
- }
172
- }
173
- setTimeout("poll_process()", 100);
174
- } else {
175
- poll_fadeout_opacity = 0;
176
- polls.reset();
177
- polls.setVar("vote", true);
178
- polls.setVar("poll_id", poll_id);
179
- polls.setVar("poll_" + poll_id, poll_answer_id);
180
- polls.method = 'POST';
181
- polls.element = 'polls-' + poll_id + '-ans';
182
- polls.onCompletion = poll_fadein_text;
183
- polls.runAJAX();
184
- poll_fadein_opacity = 0;
185
- poll_fadeout_opacity = 100;
186
- }
187
- }
188
-
189
- // Function: Process Poll's Result
190
- function poll_process_result() {
191
- if(poll_fadeout_opacity > 0) {
192
- poll_fadeout_opacity -= 10;
193
- if(is_opera) {
194
- poll_fadeout_opacity = 0;
195
- } else if(is_ie) {
196
- if(poll_show_fading) {
197
- document.getElementById('polls-' + poll_id + '-ans').style.filter = 'alpha(opacity=' + poll_fadeout_opacity + ')';
198
- } else {
199
- poll_fadeout_opacity = 0;
200
- }
201
- } else if(is_moz) {
202
- if(poll_show_fading) {
203
- document.getElementById('polls-' + poll_id + '-ans').style.MozOpacity = (poll_fadeout_opacity/100);
204
- } else {
205
- poll_fadeout_opacity = 0;
206
- }
207
- }
208
- setTimeout("poll_process_result()", 100);
209
- } else {
210
- poll_fadeout_opacity = 0;
211
- polls.reset();
212
- polls.setVar("pollresult", poll_id);
213
- polls.method = 'GET';
214
- polls.element = 'polls-' + poll_id + '-ans';
215
- polls.onCompletion = poll_fadein_text;
216
- polls.runAJAX();
217
- poll_fadein_opacity = 0;
218
- poll_fadeout_opacity = 100;
219
- }
220
- }
221
-
222
- // Function: Process Poll's Voting Booth
223
- function poll_process_booth() {
224
- if(poll_fadeout_opacity > 0) {
225
- poll_fadeout_opacity -= 10;
226
- if(is_opera) {
227
- poll_fadeout_opacity = 0;
228
- } else if(is_ie) {
229
- if(poll_show_fading) {
230
- document.getElementById('polls-' + poll_id + '-ans').style.filter = 'alpha(opacity=' + poll_fadeout_opacity + ')';
231
- } else {
232
- poll_fadeout_opacity = 0;
233
- }
234
- } else if(is_moz) {
235
- if(poll_show_fading) {
236
- document.getElementById('polls-' + poll_id + '-ans').style.MozOpacity = (poll_fadeout_opacity/100);
237
- } else {
238
- poll_fadeout_opacity = 0;
239
- }
240
- }
241
- setTimeout("poll_process_booth()", 100);
242
- } else {
243
- poll_fadeout_opacity = 0;
244
- polls.reset();
245
- polls.setVar("pollbooth", poll_id);
246
- polls.method = 'GET';
247
- polls.element = 'polls-' + poll_id + '-ans';
248
- polls.onCompletion = poll_fadein_text;
249
- polls.runAJAX();
250
- poll_fadein_opacity = 0;
251
- poll_fadeout_opacity = 100;
252
- }
253
- }
254
-
255
- // Function: Disable Poll's Voting Booth
256
- function poll_disable_voting(current_poll_id){
257
- poll_form = document.getElementById('polls_form_' + current_poll_id);
258
- for(i = 0; i < poll_form.length; i++){
259
- poll_form[i].disabled = true;
260
- }
261
- }
1
+ var poll_id=0;var poll_answer_id="";var is_being_voted=false;pollsL10n.show_loading=parseInt(pollsL10n.show_loading);pollsL10n.show_fading=parseInt(pollsL10n.show_fading);function poll_vote(a){if(!is_being_voted){set_is_being_voted(true);poll_id=a;poll_answer_id="";poll_multiple_ans=0;poll_multiple_ans_count=0;if(jQuery("#poll_multiple_ans_"+poll_id).length){poll_multiple_ans=parseInt(jQuery("#poll_multiple_ans_"+poll_id).val())}jQuery("#polls_form_"+poll_id+" :checkbox, #polls_form_"+poll_id+" :radio").each(function(b){if(jQuery(this).is(":checked")){if(poll_multiple_ans>0){poll_answer_id=jQuery(this).val()+","+poll_answer_id;poll_multiple_ans_count++}else{poll_answer_id=parseInt(jQuery(this).val())}}});if(poll_multiple_ans>0){if(poll_multiple_ans_count>0&&poll_multiple_ans_count<=poll_multiple_ans){poll_answer_id=poll_answer_id.substring(0,(poll_answer_id.length-1));poll_process()}else{if(poll_multiple_ans_count==0){set_is_being_voted(false);alert(pollsL10n.text_valid)}else{set_is_being_voted(false);alert(pollsL10n.text_multiple+" "+poll_multiple_ans)}}}else{if(poll_answer_id>0){poll_process()}else{set_is_being_voted(false);alert(pollsL10n.text_valid)}}}else{alert(pollsL10n.text_wait)}}function poll_process(){if(pollsL10n.show_fading){jQuery("#polls-"+poll_id).fadeTo("def",0,function(){if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"POST",url:pollsL10n.ajax_url,data:"vote=true&poll_id="+poll_id+"&poll_"+poll_id+"="+poll_answer_id,cache:false,success:poll_process_success})})}else{if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"POST",url:pollsL10n.ajax_url,data:"vote=true&poll_id="+poll_id+"&poll_"+poll_id+"="+poll_answer_id,cache:false,success:poll_process_success})}}function poll_result(a){if(!is_being_voted){set_is_being_voted(true);poll_id=a;if(pollsL10n.show_fading){jQuery("#polls-"+poll_id).fadeTo("def",0,function(){if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"GET",url:pollsL10n.ajax_url,data:"pollresult="+poll_id,cache:false,success:poll_process_success})})}else{if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"GET",url:pollsL10n.ajax_url,data:"pollresult="+poll_id,cache:false,success:poll_process_success})}}else{alert(pollsL10n.text_wait)}}function poll_booth(a){if(!is_being_voted){set_is_being_voted(true);poll_id=a;if(pollsL10n.show_fading){jQuery("#polls-"+poll_id).fadeTo("def",0,function(){if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"GET",url:pollsL10n.ajax_url,data:"pollbooth="+poll_id,cache:false,success:poll_process_success})})}else{if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").show()}jQuery.ajax({type:"GET",url:pollsL10n.ajax_url,data:"pollbooth="+poll_id,cache:false,success:poll_process_success})}}else{alert(pollsL10n.text_wait)}}function poll_process_success(a){jQuery("#polls-"+poll_id).html(a);if(pollsL10n.show_loading){jQuery("#polls-"+poll_id+"-loading").hide()}if(pollsL10n.show_fading){jQuery("#polls-"+poll_id).fadeTo("def",1,function(){set_is_being_voted(false)})}else{set_is_being_voted(false)}}function set_is_being_voted(a){is_being_voted=a};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
polls-logs.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -124,10 +124,10 @@ if(!empty($_POST['do'])) {
124
  <h2><?php _e('Poll\'s Logs', 'wp-polls'); ?></h2>
125
  <h3><?php echo $poll_question; ?></h3>
126
  <p>
127
- <?php printf(__ngettext('There are a total of <strong>%s</strong> recorded vote for this poll.', 'There are a total of <strong>%s</strong> recorded votes for this poll.', $poll_totalrecorded, 'wp-polls'), number_format_i18n($poll_totalrecorded)); ?><br />
128
- <?php printf(__ngettext('<strong>&raquo;</strong> <strong>%s</strong> vote is casted by registered users', '<strong>&raquo;</strong> <strong>%s</strong> votes are casted by registered users', $poll_registered, 'wp-polls'), number_format_i18n($poll_registered)); ?><br />
129
- <?php printf(__ngettext('<strong>&raquo;</strong> <strong>%s</strong> vote is casted by comment authors', '<strong>&raquo;</strong> <strong>%s</strong> votes are casted by comment authors', $poll_comments, 'wp-polls'), number_format_i18n($poll_comments)); ?><br />
130
- <?php printf(__ngettext('<strong>&raquo;</strong> <strong>%s</strong> vote is casted by guests', '<strong>&raquo;</strong> <strong>%s</strong> votes are casted by guests', $poll_guest, 'wp-polls'), number_format_i18n($poll_guest)); ?>
131
  </p>
132
  </div>
133
  <?php if($poll_totalrecorded > 0) { ?>
@@ -197,9 +197,9 @@ if(!empty($_POST['do'])) {
197
  echo '<option value="1">'.__('1 Answer', 'wp-polls').'</option>';
198
  } else {
199
  if($i == $num_choices) {
200
- echo '<option value="'.$i.'" selected="selected">'.sprintf(__ngettext('%s Answer', '%s Answers', $i, 'wp-polls'), number_format_i18n($i)).'</option>';
201
  } else {
202
- echo '<option value="'.$i.'">'.sprintf(__ngettext('%s Answer', '%s Answers', $i, 'wp-polls'), number_format_i18n($i)).'</option>';
203
  }
204
  }
205
  }
@@ -302,7 +302,7 @@ if(!empty($_POST['do'])) {
302
  }
303
  echo "<tr $style>\n";
304
  echo "<td>{$pollip_answers[$pollip_aid]}</td>\n";
305
- echo "<td>$pollip_ip</td>\n";
306
  echo "<td>$pollip_host</td>\n";
307
  echo "<td>$pollip_date</td>\n";
308
  echo "</tr>\n";
@@ -340,7 +340,7 @@ if(!empty($_POST['do'])) {
340
  echo "<tr $style>\n";
341
  echo "<td>".number_format_i18n($i)."</td>\n";
342
  echo "<td>$pollip_user</td>\n";
343
- echo "<td>$pollip_ip / $pollip_host</td>\n";
344
  echo "<td>$pollip_date</td>\n";
345
  echo "</tr>\n";
346
  $poll_last_aid = $pollip_aid;
@@ -371,7 +371,7 @@ if(!empty($_POST['do'])) {
371
  <?php if($poll_logs_count) { ?>
372
  <strong><?php _e('Are You Sure You Want To Delete Logs For This Poll Only?', 'wp-polls'); ?></strong><br /><br />
373
  <input type="checkbox" id="delete_logs_yes" name="delete_logs_yes" value="yes" />&nbsp;<label for="delete_logs_yes"><?php _e('Yes', 'wp-polls'); ?></label><br /><br />
374
- <input type="button" name="do" value="<?php _e('Delete Logs For This Poll Only', 'wp-polls'); ?>" class="button" onclick="delete_this_poll_logs(<?php echo $poll_id; ?>, '<?php printf(js_escape(__('You are about to delete poll logs for this poll \'%s\' ONLY. This action is not reversible.', 'wp-polls')), htmlspecialchars($poll_question_text)); ?>');" />
375
  <?php
376
  } else {
377
  _e('No poll logs available for this poll.', 'wp-polls');
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
6
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
124
  <h2><?php _e('Poll\'s Logs', 'wp-polls'); ?></h2>
125
  <h3><?php echo $poll_question; ?></h3>
126
  <p>
127
+ <?php printf(_n('There are a total of <strong>%s</strong> recorded vote for this poll.', 'There are a total of <strong>%s</strong> recorded votes for this poll.', $poll_totalrecorded, 'wp-polls'), number_format_i18n($poll_totalrecorded)); ?><br />
128
+ <?php printf(_n('<strong>&raquo;</strong> <strong>%s</strong> vote is casted by registered users', '<strong>&raquo;</strong> <strong>%s</strong> votes are casted by registered users', $poll_registered, 'wp-polls'), number_format_i18n($poll_registered)); ?><br />
129
+ <?php printf(_n('<strong>&raquo;</strong> <strong>%s</strong> vote is casted by comment authors', '<strong>&raquo;</strong> <strong>%s</strong> votes are casted by comment authors', $poll_comments, 'wp-polls'), number_format_i18n($poll_comments)); ?><br />
130
+ <?php printf(_n('<strong>&raquo;</strong> <strong>%s</strong> vote is casted by guests', '<strong>&raquo;</strong> <strong>%s</strong> votes are casted by guests', $poll_guest, 'wp-polls'), number_format_i18n($poll_guest)); ?>
131
  </p>
132
  </div>
133
  <?php if($poll_totalrecorded > 0) { ?>
197
  echo '<option value="1">'.__('1 Answer', 'wp-polls').'</option>';
198
  } else {
199
  if($i == $num_choices) {
200
+ echo '<option value="'.$i.'" selected="selected">'.sprintf(_n('%s Answer', '%s Answers', $i, 'wp-polls'), number_format_i18n($i)).'</option>';
201
  } else {
202
+ echo '<option value="'.$i.'">'.sprintf(_n('%s Answer', '%s Answers', $i, 'wp-polls'), number_format_i18n($i)).'</option>';
203
  }
204
  }
205
  }
302
  }
303
  echo "<tr $style>\n";
304
  echo "<td>{$pollip_answers[$pollip_aid]}</td>\n";
305
+ echo "<td><a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=$pollip_ip\" title=\"$pollip_ip\">$pollip_ip</a></td>\n";
306
  echo "<td>$pollip_host</td>\n";
307
  echo "<td>$pollip_date</td>\n";
308
  echo "</tr>\n";
340
  echo "<tr $style>\n";
341
  echo "<td>".number_format_i18n($i)."</td>\n";
342
  echo "<td>$pollip_user</td>\n";
343
+ echo "<td><a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=$pollip_ip\" title=\"$pollip_ip\">$pollip_ip</a> / $pollip_host</td>\n";
344
  echo "<td>$pollip_date</td>\n";
345
  echo "</tr>\n";
346
  $poll_last_aid = $pollip_aid;
371
  <?php if($poll_logs_count) { ?>
372
  <strong><?php _e('Are You Sure You Want To Delete Logs For This Poll Only?', 'wp-polls'); ?></strong><br /><br />
373
  <input type="checkbox" id="delete_logs_yes" name="delete_logs_yes" value="yes" />&nbsp;<label for="delete_logs_yes"><?php _e('Yes', 'wp-polls'); ?></label><br /><br />
374
+ <input type="button" name="do" value="<?php _e('Delete Logs For This Poll Only', 'wp-polls'); ?>" class="button" onclick="delete_this_poll_logs(<?php echo $poll_id; ?>, '<?php printf(js_escape(__('You are about to delete poll logs for this poll \'%s\' ONLY. This action is not reversible.', 'wp-polls')), htmlspecialchars($poll_question)); ?>');" />
375
  <?php
376
  } else {
377
  _e('No poll logs available for this poll.', 'wp-polls');
polls-manager.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -159,7 +159,7 @@ switch($mode) {
159
  break;
160
  // Edit A Poll
161
  case 'edit':
162
- $last_col_align = ('rtl' == $text_direction) ? 'left' : 'right';
163
  $poll_question = $wpdb->get_row("SELECT pollq_question, pollq_timestamp, pollq_totalvotes, pollq_active, pollq_expiry, pollq_multiple, pollq_totalvoters FROM $wpdb->pollsq WHERE pollq_id = $poll_id");
164
  $poll_answers = $wpdb->get_results("SELECT polla_aid, polla_answers, polla_votes FROM $wpdb->pollsa WHERE polla_qid = $poll_id ORDER BY polla_aid ASC");
165
  $poll_noquestion = $wpdb->get_var("SELECT COUNT(polla_aid) FROM $wpdb->pollsa WHERE polla_qid = $poll_id");
@@ -171,137 +171,10 @@ switch($mode) {
171
  $poll_multiple = intval($poll_question->pollq_multiple);
172
  $poll_totalvoters = intval($poll_question->pollq_totalvoters);
173
  ?>
174
- <script type="text/javascript">
175
- /* <![CDATA[*/
176
- var total_votes = 0;
177
- var total_new_votes = 0;
178
- function check_totalvotes() {
179
- var temp_vote = 0;
180
- total_votes = 0;
181
- <?php
182
- foreach($poll_answers as $poll_answer) {
183
- $polla_aid = intval($poll_answer->polla_aid);
184
- echo "\t\t\t\tif(document.getElementById('polla_votes-$polla_aid')) {\n";
185
- echo "\t\t\t\t\ttemp_vote = parseInt(document.getElementById('polla_votes-$polla_aid').value);\n";
186
- echo "\t\t\t\t\tif(isNaN(temp_vote)) {\n";
187
- echo "\t\t\t\t\t\tdocument.getElementById('polla_votes-$polla_aid').value = 0;\n";
188
- echo "\t\t\t\t\t\ttemp_vote = 0;\n";
189
- echo "\t\t\t\t\t}\n";
190
- echo "\t\t\t\t\ttotal_votes += temp_vote;\n";
191
- echo "\t\t\t\t}\n";
192
- }
193
- ?>
194
- totalvotes();
195
- }
196
- function check_totalvotes_new() {
197
- var new_votes = document.getElementsByName("polla_answers_new_votes[]");
198
- var temp_new_vote = 0;
199
- total_new_votes = 0;
200
- for(i = 0; i < new_votes.length; i++) {
201
- temp_new_vote = parseInt(new_votes[i].value);
202
- if(isNaN(temp_new_vote)) {
203
- temp_new_vote = 0;
204
- }
205
- total_new_votes += temp_new_vote;
206
- }
207
- totalvotes();
208
- }
209
- function totalvotes() {
210
- document.getElementById('pollq_totalvotes').value = (parseInt(total_votes) + parseInt(total_new_votes));
211
- }
212
- function check_polltimestamp() {
213
- poll_edit_polltimestamp = document.getElementById("edit_polltimestamp").checked;
214
- if(poll_edit_polltimestamp) {
215
- document.getElementById("pollq_timestamp").style.display = 'block';
216
- } else {
217
- document.getElementById("pollq_timestamp").style.display = 'none';
218
- }
219
- }
220
- function check_pollexpiry() {
221
- pollq_expiry_no = document.getElementById("pollq_expiry_no").checked;
222
- if(pollq_expiry_no) {
223
- document.getElementById("pollq_expiry_timestamp").style.display = 'none';
224
- } else {
225
- document.getElementById("pollq_expiry_timestamp").style.display = 'block';
226
- }
227
- }
228
- var count_poll_answer = <?php echo $poll_noquestion; ?>;
229
- var count_poll_answer_new = 0;
230
- function create_poll_answer() {
231
- // Create Elements
232
- var poll_tr = document.createElement("tr");
233
- var poll_td1 = document.createElement("th");
234
- var poll_td2 = document.createElement("td");
235
- var poll_td3 = document.createElement("td");
236
- var poll_answer = document.createElement("input");
237
- var poll_votes = document.createElement("input");
238
- var poll_answer_count = document.createTextNode("<?php _e('Answer', 'wp-polls'); ?> " + (count_poll_answer+1));
239
- var poll_votes_count = document.createTextNode("0 ");
240
- var poll_answer_bold = document.createElement("strong");
241
- var poll_option = document.createElement("option");
242
- var poll_option_text = document.createTextNode((count_poll_answer+1));
243
- count_poll_answer++;
244
- count_poll_answer_new++;
245
- // Elements - Input
246
- poll_answer.setAttribute('type', "text");
247
- poll_answer.setAttribute('name', "polla_answers_new[]");
248
- poll_answer.setAttribute('size', "50");
249
- poll_votes.setAttribute('type', "text");
250
- poll_votes.setAttribute('name', "polla_answers_new_votes[]")
251
- poll_votes.setAttribute('size', "4");
252
- poll_votes.setAttribute('value', "0");
253
- poll_votes.setAttribute('onblur', "check_totalvotes_new();");
254
- // Elements - Options
255
- poll_option.setAttribute('value', count_poll_answer);
256
- poll_option.setAttribute('id', "pollq-multiple-" + (count_poll_answer+1));
257
- // Elements - TD/TR
258
- poll_tr.setAttribute('id', "poll-answer-new-" + count_poll_answer_new);
259
- poll_td1.setAttribute('width', "20%");
260
- poll_td1.setAttribute('scope', "row");
261
- poll_td1.setAttribute('valign', "top");
262
- poll_td2.setAttribute('width', "60%");
263
- poll_td3.setAttribute('width', "20%");
264
- poll_td3.setAttribute('align', "<?php echo $last_col_align; ?>");
265
- // Appending To Elements
266
- poll_tr.appendChild(poll_td1);
267
- poll_tr.appendChild(poll_td2);
268
- poll_tr.appendChild(poll_td3);
269
- poll_answer_bold.appendChild(poll_answer_count);
270
- poll_td1.appendChild(poll_answer_bold);
271
- poll_td2.appendChild(poll_answer);
272
- poll_td3.appendChild(poll_votes_count);
273
- poll_td3.appendChild(poll_votes);
274
- poll_option.appendChild(poll_option_text);
275
- document.getElementById("poll_answers").appendChild(poll_tr);
276
- document.getElementById("pollq_multiple").appendChild(poll_option);
277
- }
278
- function remove_poll_answer() {
279
- if(count_poll_answer_new == 0) {
280
- alert("<?php _e('No more poll\'s answer to be removed.', 'wp-polls'); ?>");
281
- } else {
282
- document.getElementById("poll_answers").removeChild(document.getElementById("poll-answer-new-" + count_poll_answer_new));
283
- document.getElementById("pollq_multiple").removeChild(document.getElementById("pollq-multiple-" + (count_poll_answer+1)));
284
- document.getElementById("pollq_multiple").value = count_poll_answer;
285
- count_poll_answer--;
286
- count_poll_answer_new--;
287
- check_totalvotes_new();
288
- }
289
- }
290
- function check_pollq_multiple() {
291
- if(parseInt(document.getElementById("pollq_multiple_yes").value) == 1) {
292
- document.getElementById("pollq_multiple").disabled = false;
293
- } else {
294
- document.getElementById("pollq_multiple").value = 1;
295
- document.getElementById("pollq_multiple").disabled = true;
296
- }
297
- }
298
- /* ]]> */
299
- </script>
300
-
301
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade">'.stripslashes($text).'</div>'; } else { echo '<div id="message" class="updated" style="display: none;"></div>'; } ?>
302
 
303
  <!-- Edit Poll -->
304
- <form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>" method="post">
305
  <input type="hidden" name="pollq_id" value="<?php echo $poll_id; ?>" />
306
  <input type="hidden" name="pollq_active" value="<?php echo $poll_active; ?>" />
307
  <div class="wrap">
@@ -351,7 +224,7 @@ switch($mode) {
351
  <tbody>
352
  <tr>
353
  <td width="20%">&nbsp;</td>
354
- <td width="60%"><input type="button" value="<?php _e('Add Answer', 'wp-polls') ?>" onclick="create_poll_answer();" class="button" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="<?php _e('Remove Answer', 'wp-polls') ?>" onclick="remove_poll_answer();" class="button" /></td>
355
  <td width="20%" align="<?php echo $last_col_align; ?>"><strong><?php _e('Total Votes:', 'wp-polls'); ?></strong> <strong id="poll_total_votes"><?php echo number_format_i18n($poll_actual_totalvotes); ?></strong> <input type="text" size="4" readonly="readonly" id="pollq_totalvotes" name="pollq_totalvotes" value="<?php echo $poll_actual_totalvotes; ?>" onblur="check_totalvotes();" /></td>
356
  </tr>
357
  <tr>
@@ -414,15 +287,15 @@ switch($mode) {
414
  <br />
415
  <input type="checkbox" name="pollq_expiry_no" id="pollq_expiry_no" value="1" onclick="check_pollexpiry();" <?php if(empty($poll_expiry)) { echo 'checked="checked"'; } ?> />
416
  <label for="pollq_expiry_no"><?php _e('Do NOT Expire This Poll', 'wp-polls'); ?></label><br />
417
- <div id="pollq_expiry_timestamp" style="display: <?php if(empty($poll_expiry)) { echo 'none'; } else { echo 'block'; } ?>;">
418
  <?php
419
  if(empty($poll_expiry)) {
420
- poll_timestamp(current_time('timestamp'), 'pollq_expiry');
421
  } else {
422
  poll_timestamp($poll_expiry, 'pollq_expiry');
423
  }
424
  ?>
425
- </div>
426
  </td>
427
  </tr>
428
  </table>
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
6
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
159
  break;
160
  // Edit A Poll
161
  case 'edit':
162
+ $last_col_align = ('rtl' == $text_direction) ? 'left' : 'right';
163
  $poll_question = $wpdb->get_row("SELECT pollq_question, pollq_timestamp, pollq_totalvotes, pollq_active, pollq_expiry, pollq_multiple, pollq_totalvoters FROM $wpdb->pollsq WHERE pollq_id = $poll_id");
164
  $poll_answers = $wpdb->get_results("SELECT polla_aid, polla_answers, polla_votes FROM $wpdb->pollsa WHERE polla_qid = $poll_id ORDER BY polla_aid ASC");
165
  $poll_noquestion = $wpdb->get_var("SELECT COUNT(polla_aid) FROM $wpdb->pollsa WHERE polla_qid = $poll_id");
171
  $poll_multiple = intval($poll_question->pollq_multiple);
172
  $poll_totalvoters = intval($poll_question->pollq_totalvoters);
173
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade">'.stripslashes($text).'</div>'; } else { echo '<div id="message" class="updated" style="display: none;"></div>'; } ?>
175
 
176
  <!-- Edit Poll -->
177
+ <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>&amp;mode=edit&amp;id=<?php echo $poll_id; ?>">
178
  <input type="hidden" name="pollq_id" value="<?php echo $poll_id; ?>" />
179
  <input type="hidden" name="pollq_active" value="<?php echo $poll_active; ?>" />
180
  <div class="wrap">
224
  <tbody>
225
  <tr>
226
  <td width="20%">&nbsp;</td>
227
+ <td width="60%"><input type="button" value="<?php _e('Add Answer', 'wp-polls') ?>" onclick="add_poll_answer_edit();" class="button" /></td>
228
  <td width="20%" align="<?php echo $last_col_align; ?>"><strong><?php _e('Total Votes:', 'wp-polls'); ?></strong> <strong id="poll_total_votes"><?php echo number_format_i18n($poll_actual_totalvotes); ?></strong> <input type="text" size="4" readonly="readonly" id="pollq_totalvotes" name="pollq_totalvotes" value="<?php echo $poll_actual_totalvotes; ?>" onblur="check_totalvotes();" /></td>
229
  </tr>
230
  <tr>
287
  <br />
288
  <input type="checkbox" name="pollq_expiry_no" id="pollq_expiry_no" value="1" onclick="check_pollexpiry();" <?php if(empty($poll_expiry)) { echo 'checked="checked"'; } ?> />
289
  <label for="pollq_expiry_no"><?php _e('Do NOT Expire This Poll', 'wp-polls'); ?></label><br />
290
+
291
  <?php
292
  if(empty($poll_expiry)) {
293
+ poll_timestamp(current_time('timestamp'), 'pollq_expiry', 'none');
294
  } else {
295
  poll_timestamp($poll_expiry, 'pollq_expiry');
296
  }
297
  ?>
298
+
299
  </td>
300
  </tr>
301
  </table>
polls-options.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -99,38 +99,30 @@ if($_POST['Submit']) {
99
  <script type="text/javascript">
100
  /* <![CDATA[*/
101
  function set_pollbar_height(height) {
102
- document.getElementById('poll_bar_height').value = height;
103
  }
104
  function update_pollbar(where) {
105
- pollbar_background = '#' + document.getElementById('poll_bar_bg').value;
106
- pollbar_border = '#' + document.getElementById('poll_bar_border').value;
107
- pollbar_height = document.getElementById('poll_bar_height').value + 'px';
108
- if(where == 'background') {
109
- document.getElementById('wp-polls-pollbar-bg').style.backgroundColor = pollbar_background;
110
- } else if(where == 'border') {
111
- document.getElementById('wp-polls-pollbar-border').style.backgroundColor = pollbar_border;
112
- } else if(where == 'style') {
113
- pollbar_style_options = document.getElementById('poll_options_form').poll_bar_style;
114
- for(i = 0; i < pollbar_style_options.length; i++) {
115
- if(pollbar_style_options[i].checked) {
116
- pollbar_style = pollbar_style_options[i].value;
117
- break;
118
- }
119
- }
120
- if(pollbar_style == 'use_css') {
121
- document.getElementById('wp-polls-pollbar').style.backgroundImage = "";
122
  } else {
123
- document.getElementById('wp-polls-pollbar').style.backgroundImage = "url('<?php echo plugins_url('wp-polls/images/'); ?>" + pollbar_style + "/pollbg.gif')";
124
  }
125
  }
126
- document.getElementById('wp-polls-pollbar').style.backgroundColor = pollbar_background;
127
- document.getElementById('wp-polls-pollbar').style.border = '1px solid ' + pollbar_border;
128
- document.getElementById('wp-polls-pollbar').style.height = pollbar_height;
129
  }
130
  /* ]]> */
131
  </script>
132
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
133
- <form id="poll_options_form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
134
  <div class="wrap">
135
  <div id="icon-wp-polls" class="icon32"><br /></div>
136
  <h2><?php _e('Poll Options', 'wp-polls'); ?></h2>
@@ -146,26 +138,26 @@ if($_POST['Submit']) {
146
  $pollbar_path = WP_PLUGIN_DIR.'/wp-polls/images';
147
  if($handle = @opendir($pollbar_path)) {
148
  while (false !== ($filename = readdir($handle))) {
149
- if ($filename != '.' && $filename != '..') {
150
  if(is_dir($pollbar_path.'/'.$filename)) {
151
- echo '<p>'."\n";
152
  $pollbar_info = getimagesize($pollbar_path.'/'.$filename.'/pollbg.gif');
153
  if($pollbar['style'] == $filename) {
154
- echo '<input type="radio" name="poll_bar_style" value="'.$filename.'" checked="checked" onclick="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
155
  } else {
156
- echo '<input type="radio" name="poll_bar_style" value="'.$filename.'" onclick="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
157
  }
158
- echo '&nbsp;&nbsp;&nbsp;';
159
  echo '<img src="'.$pollbar_url.'/'.$filename.'/pollbg.gif" height="'.$pollbar_info[1].'" width="100" alt="pollbg.gif" />';
160
- echo '&nbsp;&nbsp;&nbsp;('.$filename.')';
161
- echo '</p>'."\n";
162
  }
163
  }
164
  }
165
  closedir($handle);
166
  }
167
  ?>
168
- <input type="radio" name="poll_bar_style" value="use_css"<?php checked('use_css', $pollbar['style']); ?> onclick="update_pollbar('style');" /> <?php _e('Use CSS Style', 'wp-polls'); ?>
169
  </td>
170
  </tr>
171
  <tr>
@@ -251,7 +243,7 @@ if($_POST['Submit']) {
251
  <th scope="row" valign="top"><?php _e('Sort Poll Results By:', 'wp-polls'); ?></th>
252
  <td>
253
  <select name="poll_ans_result_sortby" size="1">
254
- <option value="polla_votes"<?php selected('polla_votes', get_option('poll_ans_result_sortby')); ?>><?php _e('Votes Casted', 'wp-polls'); ?></option>
255
  <option value="polla_aid"<?php selected('polla_aid', get_option('poll_ans_result_sortby')); ?>><?php _e('Exact Order', 'wp-polls'); ?></option>
256
  <option value="polla_answers"<?php selected('polla_answers', get_option('poll_ans_result_sortby')); ?>><?php _e('Alphabetical Order', 'wp-polls'); ?></option>
257
  <option value="RAND()"<?php selected('RAND()', get_option('poll_ans_result_sortby')); ?>><?php _e('Random Order', 'wp-polls'); ?></option>
@@ -351,9 +343,6 @@ if($_POST['Submit']) {
351
  <option value="-1"<?php selected(-1, get_option('poll_currentpoll')); ?>><?php _e('Do NOT Display Poll (Disable)', 'wp-polls'); ?></option>
352
  <option value="-2"<?php selected(-2, get_option('poll_currentpoll')); ?>><?php _e('Display Random Poll', 'wp-polls'); ?></option>
353
  <option value="0"<?php selected(0, get_option('poll_currentpoll')); ?>><?php _e('Display Latest Poll', 'wp-polls'); ?></option>
354
- <?php if(function_exists('dynamic_sidebar')) { ?>
355
- <option value="-3"<?php selected(-3, get_option('poll_currentpoll')); ?>><?php _e('Display Multiple Polls', 'wp-polls'); ?></option>
356
- <?php } ?>
357
  <optgroup>&nbsp;</optgroup>
358
  <?php
359
  $polls = $wpdb->get_results("SELECT pollq_id, pollq_question FROM $wpdb->pollsq ORDER BY pollq_id DESC");
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
6
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
99
  <script type="text/javascript">
100
  /* <![CDATA[*/
101
  function set_pollbar_height(height) {
102
+ jQuery("#poll_bar_height").val(height);
103
  }
104
  function update_pollbar(where) {
105
+ pollbar_background = "#" + jQuery("#poll_bar_bg").val();
106
+ pollbar_border = "#" + jQuery("#poll_bar_border").val();
107
+ pollbar_height = jQuery("#poll_bar_height").val() + "px";
108
+ if(where == "background") {
109
+ jQuery("#wp-polls-pollbar-bg").css("background-color", pollbar_background);
110
+ } else if(where == "border") {
111
+ jQuery("#wp-polls-pollbar-border").css("background-color", pollbar_border);
112
+ } else if(where == "style") {
113
+ pollbar_style = jQuery("input[name='poll_bar_style']:checked").val();
114
+ if(pollbar_style == "use_css") {
115
+ jQuery("#wp-polls-pollbar").css("background-image", "none");
 
 
 
 
 
 
116
  } else {
117
+ jQuery("#wp-polls-pollbar").css("background-image", "url('<?php echo plugins_url('wp-polls/images/'); ?>" + pollbar_style + "/pollbg.gif')");
118
  }
119
  }
120
+ jQuery("#wp-polls-pollbar").css({"background-color":pollbar_background, "border":"1px solid " + pollbar_border, "height":pollbar_height});
 
 
121
  }
122
  /* ]]> */
123
  </script>
124
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
125
+ <form id="poll_options_form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
126
  <div class="wrap">
127
  <div id="icon-wp-polls" class="icon32"><br /></div>
128
  <h2><?php _e('Poll Options', 'wp-polls'); ?></h2>
138
  $pollbar_path = WP_PLUGIN_DIR.'/wp-polls/images';
139
  if($handle = @opendir($pollbar_path)) {
140
  while (false !== ($filename = readdir($handle))) {
141
+ if (substr($filename, 0, 1) != '.' && substr($filename, 0, 2) != '..') {
142
  if(is_dir($pollbar_path.'/'.$filename)) {
143
+ echo '<p>'."\n";
144
  $pollbar_info = getimagesize($pollbar_path.'/'.$filename.'/pollbg.gif');
145
  if($pollbar['style'] == $filename) {
146
+ echo '<input type="radio" id="poll_bar_style-'.$filename.'" name="poll_bar_style" value="'.$filename.'" checked="checked" onclick="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
147
  } else {
148
+ echo '<input type="radio" id="poll_bar_style-'.$filename.'" name="poll_bar_style" value="'.$filename.'" onclick="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
149
  }
150
+ echo '<label for="poll_bar_style-'.$filename.'">&nbsp;&nbsp;&nbsp;';
151
  echo '<img src="'.$pollbar_url.'/'.$filename.'/pollbg.gif" height="'.$pollbar_info[1].'" width="100" alt="pollbg.gif" />';
152
+ echo '&nbsp;&nbsp;&nbsp;('.$filename.')</label>';
153
+ echo '</p>'."\n";
154
  }
155
  }
156
  }
157
  closedir($handle);
158
  }
159
  ?>
160
+ <input type="radio" id="poll_bar_style-use_css" name="poll_bar_style" value="use_css"<?php checked('use_css', $pollbar['style']); ?> onclick="update_pollbar('style');" /><label for="poll_bar_style-use_css"> <?php _e('Use CSS Style', 'wp-polls'); ?></label>
161
  </td>
162
  </tr>
163
  <tr>
243
  <th scope="row" valign="top"><?php _e('Sort Poll Results By:', 'wp-polls'); ?></th>
244
  <td>
245
  <select name="poll_ans_result_sortby" size="1">
246
+ <option value="polla_votes"<?php selected('polla_votes', get_option('poll_ans_result_sortby')); ?>><?php _e('Votes Cast', 'wp-polls'); ?></option>
247
  <option value="polla_aid"<?php selected('polla_aid', get_option('poll_ans_result_sortby')); ?>><?php _e('Exact Order', 'wp-polls'); ?></option>
248
  <option value="polla_answers"<?php selected('polla_answers', get_option('poll_ans_result_sortby')); ?>><?php _e('Alphabetical Order', 'wp-polls'); ?></option>
249
  <option value="RAND()"<?php selected('RAND()', get_option('poll_ans_result_sortby')); ?>><?php _e('Random Order', 'wp-polls'); ?></option>
343
  <option value="-1"<?php selected(-1, get_option('poll_currentpoll')); ?>><?php _e('Do NOT Display Poll (Disable)', 'wp-polls'); ?></option>
344
  <option value="-2"<?php selected(-2, get_option('poll_currentpoll')); ?>><?php _e('Display Random Poll', 'wp-polls'); ?></option>
345
  <option value="0"<?php selected(0, get_option('poll_currentpoll')); ?>><?php _e('Display Latest Poll', 'wp-polls'); ?></option>
 
 
 
346
  <optgroup>&nbsp;</optgroup>
347
  <?php
348
  $polls = $wpdb->get_results("SELECT pollq_id, pollq_question FROM $wpdb->pollsq ORDER BY pollq_id DESC");
polls-templates.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -146,12 +146,12 @@ if($_POST['Submit']) {
146
  default_template = "<?php _e('An error has occurred when processing your poll.', 'wp-polls'); ?>";
147
  break;
148
  }
149
- document.getElementById("poll_template_" + template).value = default_template;
150
  }
151
  /* ]]> */
152
  </script>
153
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
154
- <form id="poll_options_form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
155
  <div class="wrap">
156
  <div id="icon-wp-polls" class="icon32"><br /></div>
157
  <h2><?php _e('Poll Templates', 'wp-polls'); ?></h2>
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
6
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
146
  default_template = "<?php _e('An error has occurred when processing your poll.', 'wp-polls'); ?>";
147
  break;
148
  }
149
+ jQuery("#poll_template_" + template).val(default_template);
150
  }
151
  /* ]]> */
152
  </script>
153
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
154
+ <form id="poll_template_form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
155
  <div class="wrap">
156
  <div id="icon-wp-polls" class="icon32"><br /></div>
157
  <h2><?php _e('Poll Templates', 'wp-polls'); ?></h2>
polls-uninstall.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.7 Plugin: WP-Polls 2.40 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -28,7 +28,7 @@ $base_name = plugin_basename('wp-polls/polls-manager.php');
28
  $base_page = 'admin.php?page='.$base_name;
29
  $mode = trim($_GET['mode']);
30
  $polls_tables = array($wpdb->pollsq, $wpdb->pollsa, $wpdb->pollsip);
31
- $polls_settings = array('poll_template_voteheader', 'poll_template_votebody', 'poll_template_votefooter', 'poll_template_resultheader', 'poll_template_resultbody', 'poll_template_resultbody2', 'poll_template_resultfooter', 'poll_template_resultfooter2', 'poll_template_disable', 'poll_template_error', 'poll_currentpoll', 'poll_latestpoll', 'poll_archive_perpage', 'poll_ans_sortby', 'poll_ans_sortorder', 'poll_ans_result_sortby', 'poll_ans_result_sortorder', 'poll_logging_method', 'poll_allowtovote', 'poll_archive_show', 'poll_archive_url', 'poll_bar', 'poll_close', 'poll_ajax_style', 'poll_template_pollarchivelink', 'widget_polls', 'poll_archive_displaypoll', 'poll_template_pollarchiveheader', 'poll_template_pollarchivefooter', 'poll_cookielog_expiry');
32
 
33
 
34
  ### Form Processing
@@ -56,7 +56,7 @@ if(!empty($_POST['do'])) {
56
  echo '</font><br />';
57
  } else {
58
  echo '<font color="red">';
59
- printf(__('Error deleting Setting Key \'%s\'.', 'wp-polls'), "<strong><em>{$setting}</em></strong>");
60
  echo '</font><br />';
61
  }
62
  }
@@ -87,7 +87,7 @@ switch($mode) {
87
  default:
88
  ?>
89
  <!-- Uninstall WP-Polls (By: Philippe Corbes) -->
90
- <form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>" method="post">
91
  <div class="wrap">
92
  <div id="icon-wp-polls" class="icon32"><br /></div>
93
  <h2><?php _e('Uninstall WP-Polls', 'wp-polls'); ?></h2>
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.8 Plugin: WP-Polls 2.50 |
6
+ | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
28
  $base_page = 'admin.php?page='.$base_name;
29
  $mode = trim($_GET['mode']);
30
  $polls_tables = array($wpdb->pollsq, $wpdb->pollsa, $wpdb->pollsip);
31
+ $polls_settings = array('poll_template_voteheader', 'poll_template_votebody', 'poll_template_votefooter', 'poll_template_resultheader', 'poll_template_resultbody', 'poll_template_resultbody2', 'poll_template_resultfooter', 'poll_template_resultfooter2', 'poll_template_disable', 'poll_template_error', 'poll_currentpoll', 'poll_latestpoll', 'poll_archive_perpage', 'poll_ans_sortby', 'poll_ans_sortorder', 'poll_ans_result_sortby', 'poll_ans_result_sortorder', 'poll_logging_method', 'poll_allowtovote', 'poll_archive_show', 'poll_archive_url', 'poll_bar', 'poll_close', 'poll_ajax_style', 'poll_template_pollarchivelink', 'widget_polls', 'poll_archive_displaypoll', 'poll_template_pollarchiveheader', 'poll_template_pollarchivefooter', 'poll_cookielog_expiry', 'widget_polls-widget');
32
 
33
 
34
  ### Form Processing
56
  echo '</font><br />';
57
  } else {
58
  echo '<font color="red">';
59
+ printf(__('Error deleting Setting Key \'%s\' or Setting Key \'%s\' does not exist.', 'wp-polls'), "<strong><em>{$setting}</em></strong>");
60
  echo '</font><br />';
61
  }
62
  }
87
  default:
88
  ?>
89
  <!-- Uninstall WP-Polls (By: Philippe Corbes) -->
90
+ <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
91
  <div class="wrap">
92
  <div id="icon-wp-polls" class="icon32"><br /></div>
93
  <h2><?php _e('Uninstall WP-Polls', 'wp-polls'); ?></h2>
readme.html CHANGED
@@ -2,7 +2,7 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
- <title>WP-Polls 2.40 Readme</title>
6
  <style type="text/css" media="screen">
7
  /* Default Style */
8
  BODY {
@@ -204,7 +204,7 @@
204
  <body>
205
  <div id="Container">
206
  <!-- Title -->
207
- <div id="Title">WP-Polls 2.40&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
208
 
209
  <!-- Tabs -->
210
  <ul id="Tabs">
@@ -235,6 +235,7 @@
235
  </p>
236
  <p>
237
  <strong>Download:</strong><br />
 
238
  <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-polls.2.40.zip" title="http://downloads.wordpress.org/plugin/wp-polls.2.40.zip">WP-Polls 2.40 For WordPress 2.7.x</a><br />
239
  <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-polls.2.31.zip" title="http://downloads.wordpress.org/plugin/wp-polls.2.31.zip">WP-Polls 2.31 For WordPress 2.5.x And 2.6.x</a><br />
240
  <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-polls.2.20.zip" title="http://downloads.wordpress.org/plugin/wp-polls.2.20.zip">WP-Polls 2.20 For WordPress 2.1.x, 2.2.x And 2.3.x</a><br />
@@ -285,6 +286,30 @@
285
  <div id="Changelog" style="display: none;">
286
  <div class="SubTitle">&raquo; Changelog</div>
287
  <ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
288
  <li>
289
  <strong>Version 2.40 (12-12-2008)</strong>
290
  <ul>
@@ -296,7 +321,7 @@
296
  <li>NEW: Applied Output Of polls_archive() To "polls_archive" Filter by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
297
  <li>NEW: Added Call To polls_textdomain() In create_poll_table() and vote_poll() functions by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
298
  <li>NEW: Uses wp_register_style(), wp_print_styles(), plugins_url() And site_url()</li>
299
- <li>NEW: [poll id="-1"] or <?php get_poll(-1); ?> Will Randomize The Poll</li>
300
  <li>FIXED: SSL Support</li>
301
  <li>FIXED Moved Call To update_pollbar() From onblur To onclick Event. It Was Showing The Last Selection Instead Of Current One by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
302
  </ul>
@@ -550,11 +575,14 @@
550
  <!-- Upgrade Instructions -->
551
  <div id="Upgrade" style="display: none;">
552
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
553
- <div class="SubSubTitle">From v2.xx To v2.40</div>
554
  <ol>
555
  <li>
556
  <strong>Deactivate</strong> WP-Polls Plugin
557
  </li>
 
 
 
558
  <li>
559
  Open <strong>wp-content/plugins</strong> Folder
560
  </li>
@@ -563,9 +591,10 @@
563
  <blockquote>Folder: wp-polls</blockquote>
564
  </li>
565
  <li>
566
- Delete this folder if exists:
567
  <blockquote>
568
- Folder: polls
 
569
  </blockquote>
570
  </li>
571
  <li>
@@ -574,6 +603,9 @@
574
  <li>
575
  Go to '<strong>WP-Admin -> Polls -> Polls Templates</strong>' and restore all the template variables to <strong>Default</strong>
576
  </li>
 
 
 
577
  <li>
578
  Refer To <strong>Usage</strong> For Further Instructions
579
  </li>
@@ -602,9 +634,9 @@
602
  &lt;?php endif; ?&gt;
603
  </blockquote>
604
  <p>To show specific poll, use &lt;?php get_poll(<strong>2</strong>); ?&gt; where <strong>2</strong> is your poll id.</p>
605
- <p>To show random poll, use &lt;?php get_poll(<strong>-1</strong>); ?&gt;</p>
606
  <p>To embed a specific poll in your post, use [poll id="<strong>2</strong>"] where <strong>2</strong> is your poll id.</p>
607
- <p>To embed a random poll in your post, use [poll id="<strong>-1</strong>"]</p>
608
  <p>To embed a specific poll's result in your post, use [poll id="<strong>2</strong>" type="result"] where <strong>2</strong> is your poll id.</p>
609
  </li>
610
  <li>
@@ -613,9 +645,6 @@
613
  </ol>
614
  <div class="SubSubTitle">General Usage (With Widget)</div>
615
  <ol>
616
- <li>
617
- <strong>Activate</strong> WP-Polls Widget Plugin.
618
- </li>
619
  <li>
620
  Go to '<strong>WP-Admin -> Appearance -> Widgets</strong>'.
621
  </li>
@@ -737,6 +766,6 @@
737
  </div>
738
  </div>
739
  </div>
740
- <p id="Copyright">WP-Polls 2.40<br />Copyright &copy; 2008 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
741
  </body>
742
  </html>
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
+ <title>WP-Polls 2.50 Readme</title>
6
  <style type="text/css" media="screen">
7
  /* Default Style */
8
  BODY {
204
  <body>
205
  <div id="Container">
206
  <!-- Title -->
207
+ <div id="Title">WP-Polls 2.50&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
208
 
209
  <!-- Tabs -->
210
  <ul id="Tabs">
235
  </p>
236
  <p>
237
  <strong>Download:</strong><br />
238
+ <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-polls.2.50.zip" title="http://downloads.wordpress.org/plugin/wp-polls.2.50.zip">WP-Polls 2.50 For WordPress 2.8.x</a><br />
239
  <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-polls.2.40.zip" title="http://downloads.wordpress.org/plugin/wp-polls.2.40.zip">WP-Polls 2.40 For WordPress 2.7.x</a><br />
240
  <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-polls.2.31.zip" title="http://downloads.wordpress.org/plugin/wp-polls.2.31.zip">WP-Polls 2.31 For WordPress 2.5.x And 2.6.x</a><br />
241
  <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-polls.2.20.zip" title="http://downloads.wordpress.org/plugin/wp-polls.2.20.zip">WP-Polls 2.20 For WordPress 2.1.x, 2.2.x And 2.3.x</a><br />
286
  <div id="Changelog" style="display: none;">
287
  <div class="SubTitle">&raquo; Changelog</div>
288
  <ul>
289
+ <li>
290
+ <strong>Version 2.50 (01-06-2009)</strong>
291
+ <ul>
292
+ <li>NEW: Works For WordPress 2.8 Only</li>
293
+ <li>NEW: Javascript Now Placed At The Footer</li>
294
+ <li>NEW: Uses jQuery Instead Of tw-sack</li>
295
+ <li>NEW: Minified Javascript Instead Of Packed Javascript</li>
296
+ <li>NEW: Renamed polls-admin-js-packed.js To polls-admin-js.js</li>
297
+ <li>NEW: Renamed polls-admin-js.js To polls-admin-js.dev.js</li>
298
+ <li>NEW: Renamed polls-js-packed.js To polls-js.js</li>
299
+ <li>NEW: Renamed polls-js.js To polls-js.dev.js</li>
300
+ <li>NEW: Translate Javascript Variables Using wp_localize_script()</li>
301
+ <li>NEW: Add "Add Poll" To WordPress Favourite Actions</li>
302
+ <li>NEW: Minified editor_plugin.js And Added Non-Minified editor_plugin.dev.js</li>
303
+ <li>NEW: Able To Remove Individual Answers When Adding Or Editing A Poll</li>
304
+ <li>NEW: Use _n() Instead Of __ngettext() And _n_noop() Instead Of __ngettext_noop()</li>
305
+ <li>NEW: Uses New Widget Class From WordPress</li>
306
+ <li>NEW: Merge Widget Code To wp-polls.php And Remove wp-polls-widget.php</li>
307
+ <li>FIXED: Uses $_SERVER['PHP_SELF'] With plugin_basename(__FILE__) Instead Of Just $_SERVER['REQUEST_URI']</li>
308
+ <li>FIXED: Ensure That Percentage Always Add Up To 100%</li>
309
+ <li>FIXED: More Efficient WP-Polls Archive</li>
310
+ <li>FIXED: Logged By Username Now Shows Poll Results To Users Who Did Not Login</li>
311
+ </ul>
312
+ </li>
313
  <li>
314
  <strong>Version 2.40 (12-12-2008)</strong>
315
  <ul>
321
  <li>NEW: Applied Output Of polls_archive() To "polls_archive" Filter by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
322
  <li>NEW: Added Call To polls_textdomain() In create_poll_table() and vote_poll() functions by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
323
  <li>NEW: Uses wp_register_style(), wp_print_styles(), plugins_url() And site_url()</li>
324
+ <li>NEW: [poll id="-2"] or <?php get_poll(-2); ?> Will Randomize The Poll</li>
325
  <li>FIXED: SSL Support</li>
326
  <li>FIXED Moved Call To update_pollbar() From onblur To onclick Event. It Was Showing The Last Selection Instead Of Current One by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
327
  </ul>
575
  <!-- Upgrade Instructions -->
576
  <div id="Upgrade" style="display: none;">
577
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
578
+ <div class="SubSubTitle">From v2.xx To v2.50</div>
579
  <ol>
580
  <li>
581
  <strong>Deactivate</strong> WP-Polls Plugin
582
  </li>
583
+ <li>
584
+ <strong>Deactivate</strong> WP-Polls Widget Plugin
585
+ </li>
586
  <li>
587
  Open <strong>wp-content/plugins</strong> Folder
588
  </li>
591
  <blockquote>Folder: wp-polls</blockquote>
592
  </li>
593
  <li>
594
+ Delete this folder/file if exists:
595
  <blockquote>
596
+ Folder: polls<br />
597
+ File: wp-polls-widget.php
598
  </blockquote>
599
  </li>
600
  <li>
603
  <li>
604
  Go to '<strong>WP-Admin -> Polls -> Polls Templates</strong>' and restore all the template variables to <strong>Default</strong>
605
  </li>
606
+ <li>
607
+ Go to '<strong>WP-Admin -> Appearance -> Widgets</strong>' and re-add the Poll Widget
608
+ </li>
609
  <li>
610
  Refer To <strong>Usage</strong> For Further Instructions
611
  </li>
634
  &lt;?php endif; ?&gt;
635
  </blockquote>
636
  <p>To show specific poll, use &lt;?php get_poll(<strong>2</strong>); ?&gt; where <strong>2</strong> is your poll id.</p>
637
+ <p>To show random poll, use &lt;?php get_poll(<strong>-2</strong>); ?&gt;</p>
638
  <p>To embed a specific poll in your post, use [poll id="<strong>2</strong>"] where <strong>2</strong> is your poll id.</p>
639
+ <p>To embed a random poll in your post, use [poll id="<strong>-2</strong>"]</p>
640
  <p>To embed a specific poll's result in your post, use [poll id="<strong>2</strong>" type="result"] where <strong>2</strong> is your poll id.</p>
641
  </li>
642
  <li>
645
  </ol>
646
  <div class="SubSubTitle">General Usage (With Widget)</div>
647
  <ol>
 
 
 
648
  <li>
649
  Go to '<strong>WP-Admin -> Appearance -> Widgets</strong>'.
650
  </li>
766
  </div>
767
  </div>
768
  </div>
769
+ <p id="Copyright">WP-Polls 2.50<br />Copyright &copy; 2009 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
770
  </body>
771
  </html>
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: GamerZ
3
  Donate link: http://lesterchan.net/wordpress
4
  Tags: poll, polls, polling, vote, booth, democracy, ajax, survey, post, widget
5
- Requires at least: 2.7
6
- Stable tag: 2.40
7
 
8
  Adds an AJAX poll system to your WordPress blog. You can also easily add a poll into your WordPress's blog post/page.
9
 
2
  Contributors: GamerZ
3
  Donate link: http://lesterchan.net/wordpress
4
  Tags: poll, polls, polling, vote, booth, democracy, ajax, survey, post, widget
5
+ Requires at least: 2.8
6
+ Stable tag: 2.50
7
 
8
  Adds an AJAX poll system to your WordPress blog. You can also easily add a poll into your WordPress's blog post/page.
9
 
tinymce/plugins/polls/editor_plugin.dev.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function() {
2
+ tinymce.PluginManager.requireLangPack('polls');
3
+ tinymce.create('tinymce.plugins.PollsPlugin', {
4
+ init : function(ed, url) {
5
+ ed.addCommand('mcePollInsert', function() {
6
+ ed.execCommand('mceInsertContent', 0, insertPoll('visual', ''));
7
+ });
8
+ ed.addButton('polls', {
9
+ title : 'polls.insert_poll',
10
+ cmd : 'mcePollInsert',
11
+ image : url + '/img/poll.gif'
12
+ });
13
+ ed.onNodeChange.add(function(ed, cm, n) {
14
+ cm.setActive('polls', n.nodeName == 'IMG');
15
+ });
16
+ },
17
+
18
+ createControl : function(n, cm) {
19
+ return null;
20
+ },
21
+ getInfo : function() {
22
+ return {
23
+ longname : 'WP-Polls',
24
+ author : 'Lester Chan',
25
+ authorurl : 'http://lesterchan.net',
26
+ infourl : 'http://lesterchan.net/portfolio/programming/php/',
27
+ version : '2.50'
28
+ };
29
+ }
30
+ });
31
+ tinymce.PluginManager.add('polls', tinymce.plugins.PollsPlugin);
32
+ })();
tinymce/plugins/polls/editor_plugin.js CHANGED
@@ -1,32 +1 @@
1
- (function() {
2
- tinymce.PluginManager.requireLangPack('polls');
3
- tinymce.create('tinymce.plugins.PollsPlugin', {
4
- init : function(ed, url) {
5
- ed.addCommand('mcePollInsert', function() {
6
- ed.execCommand('mceInsertContent', 0, insertPoll('visual', ''));
7
- });
8
- ed.addButton('polls', {
9
- title : 'polls.insert_poll',
10
- cmd : 'mcePollInsert',
11
- image : url + '/img/poll.gif'
12
- });
13
- ed.onNodeChange.add(function(ed, cm, n) {
14
- cm.setActive('polls', n.nodeName == 'IMG');
15
- });
16
- },
17
-
18
- createControl : function(n, cm) {
19
- return null;
20
- },
21
- getInfo : function() {
22
- return {
23
- longname : 'WP-Polls',
24
- author : 'Lester Chan',
25
- authorurl : 'http://lesterchan.net',
26
- infourl : 'http://lesterchan.net/portfolio/programming/php/',
27
- version : '2.40'
28
- };
29
- }
30
- });
31
- tinymce.PluginManager.add('polls', tinymce.plugins.PollsPlugin);
32
- })();
1
+ (function(){tinymce.PluginManager.requireLangPack("polls");tinymce.create("tinymce.plugins.PollsPlugin",{init:function(a,b){a.addCommand("mcePollInsert",function(){a.execCommand("mceInsertContent",0,insertPoll("visual",""))});a.addButton("polls",{title:"polls.insert_poll",cmd:"mcePollInsert",image:b+"/img/poll.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("polls",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"WP-Polls",author:"Lester Chan",authorurl:"http://lesterchan.net",infourl:"http://lesterchan.net/portfolio/programming/php/",version:"2.50"}}});tinymce.PluginManager.add("polls",tinymce.plugins.PollsPlugin)})();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wp-polls-widget.php DELETED
@@ -1,188 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: WP-Polls Widget
4
- Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
- Description: Adds a Poll Widget to display single or multiple polls from WP-Polls Plugin. You will need to activate WP-Polls first.
6
- Version: 2.40
7
- Author: Lester 'GaMerZ' Chan
8
- Author URI: http://lesterchan.net
9
- */
10
-
11
-
12
- /*
13
- Copyright 2008 Lester Chan (email : lesterchan@gmail.com)
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation; either version 2 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program; if not, write to the Free Software
27
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
- */
29
-
30
-
31
- ### Function: Init WP-Polls Widget
32
- function widget_polls_init() {
33
- if (!function_exists('register_sidebar_widget')) {
34
- return;
35
- }
36
-
37
- ### Function: WP-Polls Widget
38
- function widget_polls($args) {
39
- global $in_pollsarchive;
40
- extract($args);
41
- $options = get_option('widget_polls');
42
- $title = htmlspecialchars(stripslashes($options['title']));
43
- if (function_exists('vote_poll') && !in_pollarchive()) {
44
- echo $before_widget.$before_title.$title.$after_title;
45
- if(intval(get_option('poll_currentpoll')) == -3) {
46
- $multiple_polls = explode(',', $options['multiple_polls']);
47
- foreach($multiple_polls as $multiple_poll) {
48
- get_poll($multiple_poll);
49
- }
50
- } else {
51
- get_poll();
52
- }
53
- display_polls_archive_link();
54
- echo $after_widget;
55
- }
56
- }
57
-
58
- ### Function: WP-Polls Widget Options
59
- function widget_polls_options() {
60
- global $wpdb;
61
- $options = get_option('widget_polls');
62
- $current_poll = get_option('poll_currentpoll');
63
- if (!is_array($options)) {
64
- $options = array('title' => __('Polls', 'wp-polls'), 'poll_multiplepolls' => '');
65
- }
66
- if ($_POST['polls-submit']) {
67
- $poll_currentpoll = intval($_POST['poll_currentpoll']);
68
- $poll_archive_show = intval($_POST['poll_archive_show']);
69
- $options['title'] = strip_tags($_POST['polls-title']);
70
- if(is_array($_POST['poll_multiplepolls'])) {
71
- $options['multiple_polls'] = implode(',', $_POST['poll_multiplepolls']);
72
- } else {
73
- $options['multiple_polls'] = $_POST['poll_multiplepolls'];
74
- }
75
- update_option('widget_polls', $options);
76
- update_option('poll_currentpoll', $poll_currentpoll);
77
- update_option('poll_archive_show', $poll_archive_show);
78
- }
79
- ?>
80
- <script type="text/javascript">
81
- /* <![CDATA[*/
82
- function show_multiple_polls() {
83
- if(document.getElementById('poll_currentpoll').value == -3) {
84
- document.getElementById('poll_multiplepolls').disabled = false;
85
- document.getElementById('poll_multiplepolls_text').style.display = 'block';
86
- } else {
87
- document.getElementById('poll_multiplepolls').selectedIndex = -1;
88
- document.getElementById('poll_multiplepolls').disabled = true;
89
- document.getElementById('poll_multiplepolls_text').style.display = 'none';
90
- }
91
- }
92
- /* ]]> */
93
- </script>
94
- <?php
95
- echo '<p><label for="polls-title">';
96
- _e('Title', 'wp-polls');
97
- echo ': </label><input type="text" id="polls-title" name="polls-title" value="'.htmlspecialchars(stripslashes($options['title'])).'" /></p>'."\n";
98
- echo '<p><label for="polls-displayarchive">';
99
- _e('Display Polls Archive Link Below Poll?', 'wp-polls');
100
- echo ' </label>'."\n";
101
- echo '<select id="polls-displayarchive" name="poll_archive_show" size="1">'."\n";
102
- echo '<option value="0"';
103
- selected('0', get_option('poll_archive_show'));
104
- echo '>';
105
- _e('No', 'wp-polls');
106
- echo '</option>'."\n";
107
- echo '<option value="1"';
108
- selected('1', get_option('poll_archive_show'));
109
- echo '>';
110
- _e('Yes', 'wp-polls');
111
- echo '</option>'."\n";
112
- echo '</select></p>'."\n";
113
- echo '<p><label for="poll_currentpoll">';
114
- _e('Current Active Poll', 'wp-polls');
115
- echo ': </label>'."\n";
116
- echo '<select id="poll_currentpoll" name="poll_currentpoll" size="1" onchange="show_multiple_polls()">'."\n";
117
- echo '<option value="-1"';
118
- selected(-1, $current_poll);
119
- echo '>';
120
- _e('Do NOT Display Poll (Disable)', 'wp-polls');
121
- echo '</option>'."\n";
122
- echo '<option value="-2"';
123
- selected(-2, $current_poll);
124
- echo '>';
125
- _e('Display Random Poll', 'wp-polls');
126
- echo '</option>'."\n";
127
- echo '<option value="0"';
128
- selected(0, $current_poll);
129
- echo '>';
130
- _e('Display Latest Poll', 'wp-polls');
131
- echo '</option>'."\n";
132
- echo '<option value="-3"';
133
- selected(-3, $current_poll);
134
- echo '>';
135
- _e('Display Multiple Polls', 'wp-polls');
136
- echo '</option>'."\n";
137
- echo '<optgroup>&nbsp;</optgroup>'."\n";
138
- $polls = $wpdb->get_results("SELECT pollq_id, pollq_question FROM $wpdb->pollsq ORDER BY pollq_id DESC");
139
- if($polls) {
140
- foreach($polls as $poll) {
141
- $poll_question = stripslashes($poll->pollq_question);
142
- $poll_id = intval($poll->pollq_id);
143
- if($poll_id == intval($current_poll)) {
144
- echo "<option value=\"$poll_id\" selected=\"selected\">$poll_question</option>\n";
145
- } else {
146
- echo "<option value=\"$poll_id\">$poll_question</option>\n";
147
- }
148
- }
149
- }
150
- echo '</select></p>'."\n";
151
- if($current_poll == -3) {
152
- $display = 'display: block;';
153
- $disabled = '';
154
- } else {
155
- $display = 'display: none;';
156
- $disabled = 'disabled="disabled"';
157
- }
158
- echo '<p id="poll_multiplepolls_text" style="'.$display.'"><label for="poll_multiplepolls">';
159
- _e('Select Multiple Polls', 'wp-polls');
160
- echo ': </label>'."\n";
161
- echo '<select id="poll_multiplepolls" name="poll_multiplepolls[]" size="5" multiple="true" style="height: 100px; vertical-align: text-top;" $disabled>'."\n";
162
- $multiple_polls = explode(',', $options['multiple_polls']);
163
- $polls = $wpdb->get_results("SELECT pollq_id, pollq_question FROM $wpdb->pollsq ORDER BY pollq_id DESC");
164
- if($polls) {
165
- foreach($polls as $poll) {
166
- $poll_question = stripslashes($poll->pollq_question);
167
- $poll_id = intval($poll->pollq_id);
168
- if(in_array($poll_id, $multiple_polls)) {
169
- echo "<option value=\"$poll_id\" selected=\"selected\">$poll_question</option>\n";
170
- } else {
171
- echo "<option value=\"$poll_id\">$poll_question</option>\n";
172
- }
173
- }
174
- }
175
- echo '</select>'."\n";
176
- echo '</p>'."\n";
177
- echo '<input type="hidden" id="polls-submit" name="polls-submit" value="1" />'."\n";
178
- }
179
-
180
- // Register Widgets
181
- register_sidebar_widget(array('Polls', 'wp-polls'), 'widget_polls');
182
- register_widget_control(array('Polls', 'wp-polls'), 'widget_polls_options', 400, 300);
183
- }
184
-
185
-
186
- ### Function: Load The WP-Polls Widget
187
- add_action('plugins_loaded', 'widget_polls_init');
188
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wp-polls.mo CHANGED
Binary file
wp-polls.php CHANGED
@@ -3,14 +3,14 @@
3
  Plugin Name: WP-Polls
4
  Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Adds an AJAX poll system to your WordPress blog. You can easily include a poll into your WordPress's blog post/page. WP-Polls is extremely customizable via templates and css styles and there are tons of options for you to choose to ensure that WP-Polls runs the way you wanted. It now supports multiple selection of answers.
6
- Version: 2.40
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
10
 
11
 
12
  /*
13
- Copyright 2008 Lester Chan (email : lesterchan@gmail.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
@@ -88,7 +88,7 @@ function get_poll($temp_poll_id = 0, $display = true) {
88
  // Hardcoded Poll ID Is Not Specified
89
  switch($temp_poll_id) {
90
  // Random Poll
91
- case -1:
92
  $poll_id = $wpdb->get_var("SELECT pollq_id FROM $wpdb->pollsq WHERE pollq_active = 1 ORDER BY RAND() LIMIT 1");
93
  break;
94
  // Latest Poll
@@ -143,7 +143,7 @@ function get_poll($temp_poll_id = 0, $display = true) {
143
  } else {
144
  $poll_close = 0;
145
  }
146
- if($check_voted > 0 || ($poll_active == 0 && $poll_close == 1)) {
147
  if($display) {
148
  echo display_pollresult($poll_id, $check_voted);
149
  return;
@@ -151,7 +151,7 @@ function get_poll($temp_poll_id = 0, $display = true) {
151
  return display_pollresult($poll_id, $check_voted);
152
  }
153
  } elseif(!check_allowtovote() || ($poll_active == 0 && $poll_close == 3)) {
154
- $disable_poll_js = '<script type="text/javascript">poll_disable_voting('.$poll_id.');</script>';
155
  if($display) {
156
  echo display_pollvote($poll_id).$disable_poll_js;
157
  return;
@@ -170,38 +170,10 @@ function get_poll($temp_poll_id = 0, $display = true) {
170
  }
171
 
172
 
173
- ### Function: Displays Polls Header
174
- add_action('wp_head', 'poll_header');
175
- function poll_header() {
176
- global $text_direction;
177
- wp_register_script('wp-polls', plugins_url('wp-polls/polls-js-packed.js'), false, '2.40');
178
- if(@file_exists(TEMPLATEPATH.'/polls-css.css')) {
179
- wp_register_style('wp-polls', get_stylesheet_directory_uri().'/polls-css.css', false, '2.40', 'all');
180
- } else {
181
- wp_register_style('wp-polls', plugins_url('wp-polls/polls-css.css'), false, '2.40', 'all');
182
- }
183
- if('rtl' == $text_direction) {
184
- if(@file_exists(TEMPLATEPATH.'/polls-css-rtl.css')) {
185
- wp_register_style('wp-polls-rtl', get_stylesheet_directory_uri().'/polls-css-rtl.css', false, '2.40', 'all');
186
- } else {
187
- wp_register_style('wp-polls-rtl', plugins_url('wp-polls/polls-css-rtl.css'), false, '2.40', 'all');
188
- }
189
- }
190
- $poll_ajax_style = get_option('poll_ajax_style');
191
- $pollbar = get_option('poll_bar');
192
- echo "\n".'<!-- Start Of Script Generated By WP-Polls 2.40 -->'."\n";
193
- echo '<script type="text/javascript">'."\n";
194
- echo '/* <![CDATA[ */'."\n";
195
- echo "\t".'var polls_ajax_url = \''.plugins_url('wp-polls/wp-polls.php')."';\n";
196
- echo "\t".'var polls_text_wait = \''.js_escape(__('Your last request is still being processed. Please wait a while ...', 'wp-polls')).'\';'."\n";
197
- echo "\t".'var polls_text_valid = \''.js_escape(__('Please choose a valid poll answer.', 'wp-polls')).'\';'."\n";
198
- echo "\t".'var polls_text_multiple = \''.js_escape(__('Maximum number of choices allowed:', 'wp-polls')).'\';'."\n";
199
- echo "\t".'var poll_show_loading = '.intval($poll_ajax_style['loading']).';'."\n";
200
- echo "\t".'var poll_show_fading = '.intval($poll_ajax_style['fading']).';'."\n";
201
- echo '/* ]]> */'."\n";
202
- echo '</script>'."\n";
203
- wp_print_scripts(array('sack', 'wp-polls'));
204
- wp_print_styles(array('wp-polls', 'wp-polls-rtl'));
205
  echo '<style type="text/css">'."\n";
206
  if($pollbar['style'] == 'use_css') {
207
  echo '.wp-polls .pollbar {'."\n";
@@ -223,53 +195,88 @@ function poll_header() {
223
  echo '}'."\n";
224
  }
225
  echo '</style>'."\n";
226
- echo '<!-- End Of Script Generated By WP-Polls 2.40 -->'."\n";
227
  }
228
 
229
 
230
- ### Function: Displays Polls Header In WP-Admin
231
- add_action('admin_head-wp-polls/polls-manager.php', 'poll_header_admin');
232
- add_action('admin_head-wp-polls/polls-add.php', 'poll_header_admin');
233
- add_action('admin_head-wp-polls/polls-options.php', 'poll_header_admin');
234
- add_action('admin_head-wp-polls/polls-templates.php', 'poll_header_admin');
235
- add_action('admin_head-wp-polls/polls-uninstall.php', 'poll_header_admin');
236
- function poll_header_admin() {
237
- wp_register_script('wp-polls-admin', plugins_url('wp-polls/polls-admin-js-packed.js'), false, '2.40');
238
- wp_register_style('wp-polls-admin', plugins_url('wp-polls/polls-admin-css.css'), false, '2.40', 'all');
239
- echo "\n".'<!-- Start Of Script Generated By WP-Polls 2.40 -->'."\n";
240
- echo '<script type="text/javascript">'."\n";
241
- echo '/* <![CDATA[ */'."\n";
242
- echo "\t".'var polls_admin_ajax_url = \''.plugins_url('wp-polls/polls-admin-ajax.php')."';\n";
243
- echo "\t".'var polls_admin_text_delete_poll = \''.js_escape(__('Delete Poll', 'wp-polls')).'\';'."\n";
244
- echo "\t".'var polls_admin_text_no_poll_logs = \''.js_escape(__('No poll logs available.', 'wp-polls')).'\';'."\n";
245
- echo "\t".'var polls_admin_text_delete_all_logs = \''.js_escape(__('Delete All Logs', 'wp-polls')).'\';'."\n";
246
- echo "\t".'var polls_admin_text_checkbox_delete_all_logs = \''.js_escape(__('Please check the \\\'Yes\\\' checkbox if you want to delete all logs.', 'wp-polls')).'\';'."\n";
247
- echo "\t".'var polls_admin_text_delete_poll_logs = \''.js_escape(__('Delete Logs For This Poll Only', 'wp-polls')).'\';'."\n";
248
- echo "\t".'var polls_admin_text_checkbox_delete_poll_logs = \''.js_escape(__('Please check the \\\'Yes\\\' checkbox if you want to delete all logs for this poll ONLY.', 'wp-polls')).'\';'."\n";
249
- echo "\t".'var polls_admin_text_delete_poll_ans = \''.js_escape(__('Delete Poll Answer', 'wp-polls')).'\';'."\n";
250
- echo "\t".'var polls_admin_text_open_poll = \''.js_escape(__('Open Poll', 'wp-polls')).'\';'."\n";
251
- echo "\t".'var polls_admin_text_close_poll = \''.js_escape(__('Close Poll', 'wp-polls')).'\';'."\n";
252
- echo '/* ]]> */'."\n";
253
- echo '</script>'."\n";
254
- wp_print_scripts(array('sack', 'wp-polls-admin'));
255
- wp_print_styles('wp-polls-admin');
256
- echo '<!-- End Of Script Generated By WP-Polls 2.40 -->'."\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  }
258
 
259
 
260
  ### Function: Displays Polls Footer In WP-Admin
261
- add_action('admin_footer', 'poll_footer_admin');
262
- function poll_footer_admin() {
 
 
 
 
263
  echo '<script type="text/javascript">'."\n";
264
  echo '/* <![CDATA[ */'."\n";
265
- echo "\t".'var polls_admin_text_enter_poll_id = \''.js_escape(__('Enter Poll ID', 'wp-polls')).'\';'."\n";
266
- echo "\t".'var polls_admin_text_enter_poll_id_again = \''.js_escape(__('Error: Poll ID must be numeric', 'wp-polls')).'\n\n'.js_escape(__('Please enter Poll ID again', 'wp-polls')).'\';'."\n";
 
 
 
 
267
  echo "\t".'function insertPoll(where, myField) {'."\n";
268
- echo "\t\t".'var poll_id = prompt(polls_admin_text_enter_poll_id);'."\n";
269
  echo "\t\t".'while(isNaN(poll_id)) {'."\n";
270
- echo "\t\t\t".'poll_id = prompt(polls_admin_text_enter_poll_id_again);'."\n";
271
  echo "\t\t".'}'."\n";
272
- echo "\t\t".'if (poll_id >= -1) {'."\n";
273
  echo "\t\t\t".'if(where == \'code\') {'."\n";
274
  echo "\t\t\t\t".'edInsertContent(myField, \'[poll id="\' + poll_id + \'"]\');'."\n";
275
  echo "\t\t\t".'} else {'."\n";
@@ -277,17 +284,16 @@ function poll_footer_admin() {
277
  echo "\t\t\t".'}'."\n";
278
  echo "\t\t".'}'."\n";
279
  echo "\t".'}'."\n";
280
- // Javascript Code Courtesy Of WP-AddQuicktag (http://bueltge.de/wp-addquicktags-de-plugin/120/)
281
  echo "\t".'if(document.getElementById("ed_toolbar")){'."\n";
282
  echo "\t\t".'qt_toolbar = document.getElementById("ed_toolbar");'."\n";
283
- echo "\t\t".'edButtons[edButtons.length] = new edButton("ed_poll","'.js_escape(__('Poll', 'wp-polls')).'", "", "","");'."\n";
284
  echo "\t\t".'var qt_button = qt_toolbar.lastChild;'."\n";
285
  echo "\t\t".'while (qt_button.nodeType != 1){'."\n";
286
  echo "\t\t\t".'qt_button = qt_button.previousSibling;'."\n";
287
  echo "\t\t".'}'."\n";
288
  echo "\t\t".'qt_button = qt_button.cloneNode(true);'."\n";
289
- echo "\t\t".'qt_button.value = "'.js_escape(__('Poll', 'wp-polls')).'";'."\n";
290
- echo "\t\t".'qt_button.title = "'.js_escape(__('Insert Poll', 'wp-polls')).'";'."\n";
291
  echo "\t\t".'qt_button.onclick = function () { insertPoll(\'code\', edCanvas);}'."\n";
292
  echo "\t\t".'qt_button.id = "ed_poll";'."\n";
293
  echo "\t\t".'qt_toolbar.appendChild(qt_button);'."\n";
@@ -297,6 +303,14 @@ function poll_footer_admin() {
297
  }
298
 
299
 
 
 
 
 
 
 
 
 
300
  ### Function: Add Quick Tag For Poll In TinyMCE >= WordPress 2.5
301
  add_action('init', 'poll_tinymce_addbuttons');
302
  function poll_tinymce_addbuttons() {
@@ -412,8 +426,8 @@ function check_voted_ip($poll_id) {
412
  function check_voted_username($poll_id) {
413
  global $wpdb, $user_ID;
414
  // Check IP If User Is Guest
415
- if ($user_ID == 0) {
416
- return check_voted_ip($poll_id);
417
  }
418
  $pollsip_userid = intval($user_ID);
419
  $log_expiry = intval(get_option('poll_cookielog_expiry'));
@@ -432,7 +446,7 @@ function check_voted_username($poll_id) {
432
 
433
 
434
  ### Function: Display Voting Form
435
- function display_pollvote($poll_id, $without_poll_title = false) {
436
  global $wpdb;
437
  // Temp Poll Result
438
  $temp_pollvote = '';
@@ -468,16 +482,14 @@ function display_pollvote($poll_id, $without_poll_title = false) {
468
  // If There Is Poll Question With Answers
469
  if($poll_question && $poll_answers) {
470
  // Display Poll Voting Form
471
- if(!$without_poll_title) {
472
- $temp_pollvote .= "<div id=\"polls-$poll_question_id\" class=\"wp-polls\">\n";
473
- $temp_pollvote .= "\t<form id=\"polls_form_$poll_question_id\" class=\"wp-polls-form\" action=\"".htmlspecialchars($_SERVER['REQUEST_URI'])."\" method=\"post\">\n";
474
- $temp_pollvote .= "\t\t<p style=\"display: none;\"><input type=\"hidden\" name=\"poll_id\" value=\"$poll_question_id\" /></p>\n";
475
- if($poll_multiple_ans > 0) {
476
- $temp_pollvote .= "\t\t<p style=\"display: none;\"><input type=\"hidden\" id=\"poll_multiple_ans_$poll_question_id\" name=\"poll_multiple_ans_$poll_question_id\" value=\"$poll_multiple_ans\" /></p>\n";
477
- }
478
- // Print Out Voting Form Header Template
479
- $temp_pollvote .= "\t\t$template_question\n";
480
  }
 
 
481
  foreach($poll_answers as $poll_answer) {
482
  // Poll Answer Variables
483
  $poll_answer_id = intval($poll_answer->polla_aid);
@@ -519,14 +531,14 @@ function display_pollvote($poll_id, $without_poll_title = false) {
519
  }
520
  // Print Out Voting Form Footer Template
521
  $temp_pollvote .= "\t\t$template_footer\n";
522
- if(!$without_poll_title) {
523
- $temp_pollvote .= "\t</form>\n";
524
- $temp_pollvote .= "</div>\n";
525
  $poll_ajax_style = get_option('poll_ajax_style');
526
  if(intval($poll_ajax_style['loading']) == 1) {
527
  $temp_pollvote .= "<div id=\"polls-$poll_question_id-loading\" class=\"wp-polls-loading\"><img src=\"".plugins_url('wp-polls/images/loading.gif')."\" width=\"16\" height=\"16\" alt=\"".__('Loading', 'wp-polls')." ...\" title=\"".__('Loading', 'wp-polls')." ...\" class=\"wp-polls-image\" />&nbsp;".__('Loading', 'wp-polls')." ...</div>\n";
528
  }
529
- }
530
  } else {
531
  $temp_pollvote .= stripslashes(get_option('poll_template_disable'));
532
  }
@@ -536,7 +548,7 @@ function display_pollvote($poll_id, $without_poll_title = false) {
536
 
537
 
538
  ### Function: Display Results Form
539
- function display_pollresult($poll_id, $user_voted = '', $without_poll_title = false) {
540
  global $wpdb;
541
  // User Voted
542
  if(!is_array($user_voted)) {
@@ -583,16 +595,16 @@ function display_pollresult($poll_id, $user_voted = '', $without_poll_title = fa
583
  $poll_answers = $wpdb->get_results("SELECT polla_aid, polla_answers, polla_votes FROM $wpdb->pollsa WHERE polla_qid = $poll_question_id ORDER BY ".get_option('poll_ans_result_sortby').' '.get_option('poll_ans_result_sortorder'));
584
  // If There Is Poll Question With Answers
585
  if($poll_question && $poll_answers) {
 
 
586
  // Is The Poll Total Votes 0?
587
  $poll_totalvotes_zero = true;
588
  if($poll_question_totalvotes > 0) {
589
  $poll_totalvotes_zero = false;
590
  }
591
  // Print Out Result Header Template
592
- if(!$without_poll_title) {
593
- $temp_pollresult .= "<div id=\"polls-$poll_question_id\" class=\"wp-polls\">\n";
594
- $temp_pollresult .= "\t\t$template_question\n";
595
- }
596
  foreach($poll_answers as $poll_answer) {
597
  // Poll Answer Variables
598
  $poll_answer_id = intval($poll_answer->polla_aid);
@@ -616,6 +628,14 @@ function display_pollresult($poll_id, $user_voted = '', $without_poll_title = fa
616
  $poll_answer_percentage = 0;
617
  $poll_answer_imagewidth = 1;
618
  }
 
 
 
 
 
 
 
 
619
  // Let User See What Options They Voted
620
  if(in_array($poll_answer_id, $user_voted)) {
621
  // Results Body Variables
@@ -624,7 +644,7 @@ function display_pollresult($poll_id, $user_voted = '', $without_poll_title = fa
624
  $template_answer = str_replace("%POLL_ANSWER%", $poll_answer_text, $template_answer);
625
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($poll_answer_text)), $template_answer);
626
  $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($poll_answer_votes), $template_answer);
627
- $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", number_format_i18n($poll_answer_percentage, 1), $template_answer);
628
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
629
  // Print Out Results Body Template
630
  $temp_pollresult .= "\t\t$template_answer\n";
@@ -635,7 +655,7 @@ function display_pollresult($poll_id, $user_voted = '', $without_poll_title = fa
635
  $template_answer = str_replace("%POLL_ANSWER%", $poll_answer_text, $template_answer);
636
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($poll_answer_text)), $template_answer);
637
  $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($poll_answer_votes), $template_answer);
638
- $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", number_format_i18n($poll_answer_percentage, 1), $template_answer);
639
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
640
  // Print Out Results Body Template
641
  $temp_pollresult .= "\t\t$template_answer\n";
@@ -669,10 +689,10 @@ function display_pollresult($poll_id, $user_voted = '', $without_poll_title = fa
669
  $template_footer = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($poll_question_totalvoters), $template_footer);
670
  $template_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_footer);
671
  $template_footer = str_replace("%POLL_MOST_VOTES%", number_format_i18n($poll_most_votes), $template_footer);
672
- $template_footer = str_replace("%POLL_MOST_PERCENTAGE%", number_format_i18n($poll_most_percentage, 1), $template_footer);
673
  $template_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_footer);
674
  $template_footer = str_replace("%POLL_LEAST_VOTES%", number_format_i18n($poll_least_votes), $template_footer);
675
- $template_footer = str_replace("%POLL_LEAST_PERCENTAGE%", number_format_i18n($poll_least_percentage, 1), $template_footer);
676
  if($poll_multiple_ans > 0) {
677
  $template_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $poll_multiple_ans, $template_footer);
678
  } else {
@@ -680,13 +700,13 @@ function display_pollresult($poll_id, $user_voted = '', $without_poll_title = fa
680
  }
681
  // Print Out Results Footer Template
682
  $temp_pollresult .= "\t\t$template_footer\n";
683
- if(!$without_poll_title) {
684
- $temp_pollresult .= "</div>\n";
685
  $poll_ajax_style = get_option('poll_ajax_style');
686
  if(intval($poll_ajax_style['loading']) == 1) {
687
  $temp_pollresult .= "<div id=\"polls-$poll_question_id-loading\" class=\"wp-polls-loading\"><img src=\"".plugins_url('wp-polls/images/loading.gif')."\" width=\"16\" height=\"16\" alt=\"".__('Loading', 'wp-polls')." ...\" title=\"".__('Loading', 'wp-polls')." ...\" class=\"wp-polls-image\" />&nbsp;".__('Loading', 'wp-polls')." ...</div>\n";
688
  }
689
- }
690
  } else {
691
  $temp_pollresult .= stripslashes(get_option('poll_template_disable'));
692
  }
@@ -707,7 +727,7 @@ if(!function_exists('get_ipaddress')) {
707
  $ip_address = explode(',', $ip_address);
708
  $ip_address = $ip_address[0];
709
  }
710
- return $ip_address;
711
  }
712
  }
713
 
@@ -792,21 +812,16 @@ if(!function_exists('get_pollvoters')) {
792
 
793
 
794
  ### Function: Check Voted To Get Voted Answer
795
- function check_voted_multiple($poll_id) {
796
- global $polls_ips;
797
- $temp_voted_aid = array();
798
  if(!empty($_COOKIE["voted_$poll_id"])) {
799
- $temp_voted_aid = explode(',', $_COOKIE["voted_$poll_id"]);
800
  } else {
801
  if($polls_ips) {
802
- foreach($polls_ips as $polls_ip) {
803
- if($polls_ip['qid'] == $poll_id) {
804
- $temp_voted_aid[] = $polls_ip['aid'];
805
- }
806
- }
807
  }
808
  }
809
- return $temp_voted_aid;
810
  }
811
 
812
 
@@ -826,21 +841,19 @@ function polls_archive_link($page) {
826
 
827
  ### Function: Displays Polls Archive Link
828
  function display_polls_archive_link($display = true) {
829
- if(intval(get_option('poll_archive_show')) == 1) {
830
- $template_pollarchivelink = stripslashes(get_option('poll_template_pollarchivelink'));
831
- $template_pollarchivelink = str_replace("%POLL_ARCHIVE_URL%", get_option('poll_archive_url'), $template_pollarchivelink);
832
- if($display) {
833
- echo $template_pollarchivelink;
834
- } else{
835
- return $template_pollarchivelink;
836
- }
837
  }
838
  }
839
 
840
 
841
  ### Function: Display Polls Archive
842
  function polls_archive() {
843
- global $wpdb, $polls_ips, $in_pollsarchive;
844
  // Polls Variables
845
  $in_pollsarchive = true;
846
  $page = intval($_GET['poll_page']);
@@ -922,18 +935,17 @@ function polls_archive() {
922
  $answers = $wpdb->get_results("SELECT polla_aid, polla_qid, polla_answers, polla_votes FROM $wpdb->pollsa WHERE polla_qid IN ($poll_questions_ids) ORDER BY ".get_option('poll_ans_result_sortby').' '.get_option('poll_ans_result_sortorder'));
923
  if($answers) {
924
  foreach($answers as $answer) {
925
- $polls_answers[] = array('aid' => intval($answer->polla_aid), 'qid' => intval($answer->polla_qid), 'answers' => stripslashes($answer->polla_answers), 'votes' => intval($answer->polla_votes));
926
  }
927
  }
928
 
929
  // Get Poll IPs
930
- $ips = $wpdb->get_results("SELECT pollip_qid, pollip_aid FROM $wpdb->pollsip WHERE pollip_qid IN ($poll_questions_ids) AND pollip_ip = '".get_ipaddress()."'");
931
  if($ips) {
932
  foreach($ips as $ip) {
933
- $polls_ips[] = array('qid' => intval($ip->pollip_qid), 'aid' => intval($ip->pollip_aid));
934
  }
935
  }
936
-
937
  // Poll Archives
938
  $pollsarchive_output_archive .= "<div class=\"wp-polls wp-polls-archive\">\n";
939
  foreach($polls_questions as $polls_question) {
@@ -973,62 +985,68 @@ function polls_archive() {
973
  // Print Out Result Header Template
974
  $pollsarchive_output_archive .= $template_archive_header;
975
  $pollsarchive_output_archive .= $template_question;
976
- foreach($polls_answers as $polls_answer) {
977
- if($polls_question['id'] == $polls_answer['qid']) {
978
- // Calculate Percentage And Image Bar Width
979
- if(!$poll_totalvotes_zero) {
980
- if($polls_answer['votes'] > 0) {
981
- $poll_answer_percentage = round((($polls_answer['votes']/$polls_question['totalvoters'])*100));
982
- $poll_answer_imagewidth = round($poll_answer_percentage*0.9);
983
- } else {
984
- $poll_answer_percentage = 0;
985
- $poll_answer_imagewidth = 1;
986
- }
987
  } else {
988
  $poll_answer_percentage = 0;
989
  $poll_answer_imagewidth = 1;
990
  }
991
- // Let User See What Options They Voted
992
- if(in_array($polls_answer['aid'], check_voted_multiple($polls_question['id']))) {
993
- // Results Body Variables
994
- $template_answer = stripslashes(get_option('poll_template_resultbody2'));
995
- $template_answer = str_replace("%POLL_ANSWER_ID%", $polls_answer['aid'], $template_answer);
996
- $template_answer = str_replace("%POLL_ANSWER%", $polls_answer['answers'], $template_answer);
997
- $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($polls_answer['answers'])), $template_answer);
998
- $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($polls_answer['votes']), $template_answer);
999
- $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", number_format_i18n($poll_answer_percentage, 1), $template_answer);
1000
- $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
1001
- // Print Out Results Body Template
1002
- $pollsarchive_output_archive .= $template_answer;
1003
- } else {
1004
- // Results Body Variables
1005
- $template_answer = stripslashes(get_option('poll_template_resultbody'));
1006
- $template_answer = str_replace("%POLL_ANSWER_ID%", $polls_answer['aid'], $template_answer);
1007
- $template_answer = str_replace("%POLL_ANSWER%", $polls_answer['answers'], $template_answer);
1008
- $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($polls_answer['answers'])), $template_answer);
1009
- $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($polls_answer['votes']), $template_answer);
1010
- $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", number_format_i18n($poll_answer_percentage, 1), $template_answer);
1011
- $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
1012
- // Print Out Results Body Template
1013
- $pollsarchive_output_archive .= $template_answer;
1014
- }
1015
- // Get Most Voted Data
1016
- if($polls_answer['votes'] > $poll_most_votes) {
1017
- $poll_most_answer = $polls_answer['answers'];
1018
- $poll_most_votes = $polls_answer['votes'];
1019
- $poll_most_percentage = $poll_answer_percentage;
1020
- }
1021
- // Get Least Voted Data
1022
- if($poll_least_votes == 0) {
1023
- $poll_least_votes = $polls_answer['votes'];
1024
- }
1025
- if($polls_answer['votes'] <= $poll_least_votes) {
1026
- $poll_least_answer = $polls_answer['answers'];
1027
- $poll_least_votes = $polls_answer['votes'];
1028
- $poll_least_percentage = $poll_answer_percentage;
1029
  }
1030
- // Delete Away From Array
1031
- unset($polls_answer['answers']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1032
  }
1033
  }
1034
  // Results Footer Variables
@@ -1039,10 +1057,10 @@ function polls_archive() {
1039
  $template_footer = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($polls_question['totalvoters']), $template_footer);
1040
  $template_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_footer);
1041
  $template_footer = str_replace("%POLL_MOST_VOTES%", number_format_i18n($poll_most_votes), $template_footer);
1042
- $template_footer = str_replace("%POLL_MOST_PERCENTAGE%", number_format_i18n($poll_most_percentage, 1), $template_footer);
1043
  $template_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_footer);
1044
  $template_footer = str_replace("%POLL_LEAST_VOTES%", number_format_i18n($poll_least_votes), $template_footer);
1045
- $template_footer = str_replace("%POLL_LEAST_PERCENTAGE%", number_format_i18n($poll_least_percentage, 1), $template_footer);
1046
  if($polls_question['multiple'] > 0) {
1047
  $template_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $polls_question['multiple'], $template_footer);
1048
  } else {
@@ -1056,10 +1074,10 @@ function polls_archive() {
1056
  $template_archive_footer = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($polls_question['totalvoters']), $template_archive_footer);
1057
  $template_archive_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_archive_footer);
1058
  $template_archive_footer = str_replace("%POLL_MOST_VOTES%", number_format_i18n($poll_most_votes), $template_archive_footer);
1059
- $template_archive_footer = str_replace("%POLL_MOST_PERCENTAGE%", number_format_i18n($poll_most_percentage, 1), $template_archive_footer);
1060
  $template_archive_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_archive_footer);
1061
  $template_archive_footer = str_replace("%POLL_LEAST_VOTES%", number_format_i18n($poll_least_votes), $template_archive_footer);
1062
- $template_archive_footer = str_replace("%POLL_LEAST_PERCENTAGE%", number_format_i18n($poll_least_percentage, 1), $template_archive_footer);
1063
  if($polls_question['multiple'] > 0) {
1064
  $template_archive_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $polls_question['multiple'], $template_archive_footer);
1065
  } else {
@@ -1191,7 +1209,7 @@ function poll_timestamp($poll_timestamp, $fieldname = 'pollq_timestamp', $displa
1191
  function cron_polls_place() {
1192
  wp_clear_scheduled_hook('polls_cron');
1193
  if (!wp_next_scheduled('polls_cron')) {
1194
- wp_schedule_event(time(), 'daily', 'polls_cron');
1195
  }
1196
  }
1197
 
@@ -1242,18 +1260,18 @@ vote_poll();
1242
  function vote_poll() {
1243
  global $wpdb, $user_identity, $user_ID;
1244
  if(!empty($_POST['vote'])) {
1245
- polls_textdomain();
1246
  header('Content-Type: text/html; charset='.get_option('blog_charset').'');
1247
  $poll_id = intval($_POST['poll_id']);
1248
  $poll_aid = $_POST["poll_$poll_id"];
1249
- $poll_aid_array = explode(',', $poll_aid);
1250
  if($poll_id > 0 && !empty($poll_aid_array) && check_allowtovote()) {
1251
  $check_voted = check_voted($poll_id);
1252
  if($check_voted == 0) {
1253
  if(!empty($user_identity)) {
1254
- $pollip_user = addslashes($user_identity);
1255
  } elseif(!empty($_COOKIE['comment_author_'.COOKIEHASH])) {
1256
- $pollip_user = addslashes($_COOKIE['comment_author_'.COOKIEHASH]);
1257
  } else {
1258
  $pollip_user = __('Guest', 'wp-polls');
1259
  }
@@ -1268,17 +1286,22 @@ function vote_poll() {
1268
  if($cookie_expiry == 0) {
1269
  $cookie_expiry = 30000000;
1270
  }
1271
- $vote_cookie = setcookie("voted_".$poll_id, $poll_aid, ($pollip_timestamp + $cookie_expiry), COOKIEPATH);
1272
  }
 
1273
  foreach($poll_aid_array as $polla_aid) {
1274
- $wpdb->query("UPDATE $wpdb->pollsa SET polla_votes = (polla_votes+1) WHERE polla_qid = $poll_id AND polla_aid = $polla_aid");
 
 
 
 
1275
  }
1276
  $vote_q = $wpdb->query("UPDATE $wpdb->pollsq SET pollq_totalvotes = (pollq_totalvotes+".sizeof($poll_aid_array)."), pollq_totalvoters = (pollq_totalvoters+1) WHERE pollq_id = $poll_id AND pollq_active = 1");
1277
  if($vote_q) {
1278
  foreach($poll_aid_array as $polla_aid) {
1279
  $wpdb->query("INSERT INTO $wpdb->pollsip VALUES (0, $poll_id, $polla_aid, '$pollip_ip', '$pollip_host', '$pollip_timestamp', '$pollip_user', $pollip_userid)");
1280
  }
1281
- echo "<ul class=\"wp-polls-ul\">\n".display_pollresult($poll_id,$poll_aid_array, 1);
1282
  exit();
1283
  } else {
1284
  printf(__('Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s', 'wp-polls'), $poll_id);
@@ -1295,12 +1318,12 @@ function vote_poll() {
1295
  } elseif (intval($_GET['pollresult']) > 0) {
1296
  header('Content-Type: text/html; charset='.get_option('blog_charset').'');
1297
  $poll_id = intval($_GET['pollresult']);
1298
- echo "<ul class=\"wp-polls-ul\">\n".display_pollresult($poll_id, 0, true);
1299
  exit();
1300
  } elseif (intval($_GET['pollbooth']) > 0) {
1301
  header('Content-Type: text/html; charset='.get_option('blog_charset').'');
1302
  $poll_id = intval($_GET['pollbooth']);
1303
- echo "<ul class=\"wp-polls-ul\">\n".display_pollvote($poll_id, true);
1304
  exit();
1305
  } // End if(!empty($_POST['vote']))
1306
  }
@@ -1331,20 +1354,113 @@ function polls_page_general_stats($content) {
1331
  if($stats_display['polls'] == 1) {
1332
  $content .= '<p><strong>'.__('WP-Polls', 'wp-polls').'</strong></p>'."\n";
1333
  $content .= '<ul>'."\n";
1334
- $content .= '<li>'.sprintf(__ngettext('<strong>%s</strong> poll was created.', '<strong>%s</strong> polls were created.', get_pollquestions(false), 'wp-polls'), number_format_i18n(get_pollquestions(false))).'</li>'."\n";
1335
- $content .= '<li>'.sprintf(__ngettext('<strong>%s</strong> polls\' answer was given.', '<strong>%s</strong> polls\' answers were given.', get_pollanswers(false), 'wp-polls'), number_format_i18n(get_pollanswers(false))).'</li>'."\n";
1336
- $content .= '<li>'.sprintf(__ngettext('<strong>%s</strong> vote was casted.', '<strong>%s</strong> votes were casted.', get_pollvotes(false), 'wp-polls'), number_format_i18n(get_pollvotes(false))).'</li>'."\n";
1337
  $content .= '</ul>'."\n";
1338
  }
1339
  return $content;
1340
  }
1341
 
1342
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1343
  ### Function: Create Poll Tables
1344
  add_action('activate_wp-polls/wp-polls.php', 'create_poll_table');
1345
  function create_poll_table() {
1346
  global $wpdb;
1347
- polls_textdomain();
1348
  if(@is_file(ABSPATH.'/wp-admin/upgrade-functions.php')) {
1349
  include_once(ABSPATH.'/wp-admin/upgrade-functions.php');
1350
  } elseif(@is_file(ABSPATH.'/wp-admin/includes/upgrade.php')) {
@@ -1413,8 +1529,8 @@ function create_poll_table() {
1413
  '<ul class="wp-polls-ul">', 'Template For Poll\'s Question');
1414
  add_option('poll_template_votebody', '<li><input type="%POLL_CHECKBOX_RADIO%" id="poll-answer-%POLL_ANSWER_ID%" name="poll_%POLL_ID%" value="%POLL_ANSWER_ID%" /> <label for="poll-answer-%POLL_ANSWER_ID%">%POLL_ANSWER%</label></li>', 'Template For Poll\'s Answers');
1415
  add_option('poll_template_votefooter', '</ul>'.
1416
- '<p style="text-align: center;"><input type="button" name="vote" value=" '.__('Vote', 'wp-polls').' " class="Buttons" onclick="poll_vote(%POLL_ID%);" onkeypress="poll_result(%POLL_ID%);" /></p>'.
1417
- '<p style="text-align: center;"><a href="#ViewPollResults" onclick="poll_result(%POLL_ID%); return false;" onkeypress="poll_result(%POLL_ID%); return false;" title="'.__('View Results Of This Poll', 'wp-polls').'">'.__('View Results', 'wp-polls').'</a></p>'.
1418
  '</div>', 'Template For Poll\'s Voting Footer');
1419
  add_option('poll_template_resultheader', '<p style="text-align: center;"><strong>%POLL_QUESTION%</strong></p>'.
1420
  '<div id="polls-%POLL_ID%-ans" class="wp-polls-ans">'.
@@ -1426,7 +1542,7 @@ function create_poll_table() {
1426
  '</div>', 'Template For Poll Result Footer');
1427
  add_option('poll_template_resultfooter2', '</ul>'.
1428
  '<p style="text-align: center;">'.__('Total Voters', 'wp-polls').': <strong>%POLL_TOTALVOTERS%</strong></p>'.
1429
- '<p style="text-align: center;"><a href="#VotePoll" onclick="poll_booth(%POLL_ID%); return false;" onkeypress="poll_booth(%POLL_ID%); return false;" title="'.__('Vote For This Poll', 'wp-polls').'">'.__('Vote', 'wp-polls').'</a></p>'.
1430
  '</div>', 'Template For Poll Result Footer');
1431
  add_option('poll_template_disable', __('Sorry, there are no polls available at the moment.', 'wp-polls'), 'Template For Poll When It Is Disabled');
1432
  add_option('poll_template_error', __('An error has occurred when processing your poll.', 'wp-polls'), 'Template For Poll When An Error Has Occured');
@@ -1444,7 +1560,6 @@ function create_poll_table() {
1444
  // Database Upgrade For WP-Polls 2.12
1445
  maybe_add_column($wpdb->pollsip, 'pollip_userid', "ALTER TABLE $wpdb->pollsip ADD pollip_userid INT( 10 ) NOT NULL DEFAULT '0';");
1446
  add_option('poll_archive_url', site_url('pollsarchive'), 'Polls Archive URL');
1447
- add_option('poll_archive_show', 1, 'Show Polls Archive?');
1448
  // Database Upgrade For WP-Polls 2.13
1449
  add_option('poll_bar', array('style' => 'default', 'background' => 'd8e1eb', 'border' => 'c8c8c8', 'height' => 8), 'Poll Bar Style');
1450
  // Database Upgrade For WP-Polls 2.14
@@ -1470,6 +1585,8 @@ function create_poll_table() {
1470
  add_option('poll_cookielog_expiry', 0, 'Cookie And Log Expiry Time');
1471
  add_option('poll_template_pollarchivepagingheader', '', 'Displayed Before Paging In The Poll Archive');
1472
  add_option('poll_template_pollarchivepagingfooter', '', 'Displayed After Paging In The Poll Archive');
 
 
1473
  // Set 'manage_polls' Capabilities To Administrator
1474
  $role = get_role('administrator');
1475
  if(!$role->has_cap('manage_polls')) {
@@ -1477,4 +1594,4 @@ function create_poll_table() {
1477
  }
1478
  cron_polls_place();
1479
  }
1480
- ?>
3
  Plugin Name: WP-Polls
4
  Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Adds an AJAX poll system to your WordPress blog. You can easily include a poll into your WordPress's blog post/page. WP-Polls is extremely customizable via templates and css styles and there are tons of options for you to choose to ensure that WP-Polls runs the way you wanted. It now supports multiple selection of answers.
6
+ Version: 2.50
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
10
 
11
 
12
  /*
13
+ Copyright 2009 Lester Chan (email : lesterchan@gmail.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
88
  // Hardcoded Poll ID Is Not Specified
89
  switch($temp_poll_id) {
90
  // Random Poll
91
+ case -2:
92
  $poll_id = $wpdb->get_var("SELECT pollq_id FROM $wpdb->pollsq WHERE pollq_active = 1 ORDER BY RAND() LIMIT 1");
93
  break;
94
  // Latest Poll
143
  } else {
144
  $poll_close = 0;
145
  }
146
+ if(intval($check_voted) > 0 || (is_array($check_voted) && sizeof($check_voted) > 0) || ($poll_active == 0 && $poll_close == 1)) {
147
  if($display) {
148
  echo display_pollresult($poll_id, $check_voted);
149
  return;
151
  return display_pollresult($poll_id, $check_voted);
152
  }
153
  } elseif(!check_allowtovote() || ($poll_active == 0 && $poll_close == 3)) {
154
+ $disable_poll_js = '<script type="text/javascript">jQuery("#polls_form_'.$poll_id.' :input").each(function (i){jQuery(this).attr("disabled","disabled")});</script>';
155
  if($display) {
156
  echo display_pollvote($poll_id).$disable_poll_js;
157
  return;
170
  }
171
 
172
 
173
+ ### Function: Print Polls Stylesheets That Are Dynamic And jQuery At The Top
174
+ add_action('wp_head', 'poll_head_scripts');
175
+ function poll_head_scripts() {
176
+ $pollbar = get_option('poll_bar');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  echo '<style type="text/css">'."\n";
178
  if($pollbar['style'] == 'use_css') {
179
  echo '.wp-polls .pollbar {'."\n";
195
  echo '}'."\n";
196
  }
197
  echo '</style>'."\n";
198
+ wp_print_scripts('jquery');
199
  }
200
 
201
 
202
+ ### Function: Enqueue Polls JavaScripts/CSS
203
+ add_action('wp_enqueue_scripts', 'poll_scripts');
204
+ function poll_scripts() {
205
+ global $text_direction;
206
+ if(@file_exists(TEMPLATEPATH.'/polls-css.css')) {
207
+ wp_enqueue_style('wp-polls', get_stylesheet_directory_uri().'/polls-css.css', false, '2.50', 'all');
208
+ } else {
209
+ wp_enqueue_style('wp-polls', plugins_url('wp-polls/polls-css.css'), false, '2.50', 'all');
210
+ }
211
+ if('rtl' == $text_direction) {
212
+ if(@file_exists(TEMPLATEPATH.'/polls-css-rtl.css')) {
213
+ wp_enqueue_style('wp-polls-rtl', get_stylesheet_directory_uri().'/polls-css-rtl.css', false, '2.50', 'all');
214
+ } else {
215
+ wp_enqueue_style('wp-polls-rtl', plugins_url('wp-polls/polls-css-rtl.css'), false, '2.50', 'all');
216
+ }
217
+ }
218
+ $poll_ajax_style = get_option('poll_ajax_style');
219
+ $pollbar = get_option('poll_bar');
220
+ wp_enqueue_script('wp-polls', plugins_url('wp-polls/polls-js.js'), array('jquery'), '2.50', true);
221
+ wp_localize_script('wp-polls', 'pollsL10n', array(
222
+ 'ajax_url' => plugins_url('wp-polls/wp-polls.php'),
223
+ 'text_wait' => __('Your last request is still being processed. Please wait a while ...', 'wp-polls'),
224
+ 'text_valid' => __('Please choose a valid poll answer.', 'wp-polls'),
225
+ 'text_multiple' => __('Maximum number of choices allowed: ', 'wp-polls'),
226
+ 'show_loading' => intval($poll_ajax_style['loading']),
227
+ 'show_fading' => intval($poll_ajax_style['fading'])
228
+ ));
229
+ }
230
+
231
+
232
+ ### Function: Enqueue Polls Stylesheets/JavaScripts In WP-Admin
233
+ add_action('admin_enqueue_scripts', 'poll_scripts_admin');
234
+ function poll_scripts_admin($hook_suffix) {
235
+ global $text_direction;
236
+ $poll_admin_pages = array('wp-polls/polls-manager.php', 'wp-polls/polls-add.php', 'wp-polls/polls-options.php', 'wp-polls/polls-templates.php', 'wp-polls/polls-uninstall.php');
237
+ if(in_array($hook_suffix, $poll_admin_pages)) {
238
+ wp_enqueue_style('wp-polls-admin', plugins_url('wp-polls/polls-admin-css.css'), false, '2.50', 'all');
239
+ wp_enqueue_script('wp-polls-admin', plugins_url('wp-polls/polls-admin-js.js'), array('jquery'), '2.50', true);
240
+ wp_localize_script('wp-polls-admin', 'pollsAdminL10n', array(
241
+ 'admin_ajax_url' => plugins_url('wp-polls/polls-admin-ajax.php'),
242
+ 'text_direction' => ('rtl' == $text_direction) ? 'left' : 'right',
243
+ 'text_delete_poll' => __('Delete Poll', 'wp-polls'),
244
+ 'text_no_poll_logs' => __('No poll logs available.', 'wp-polls'),
245
+ 'text_delete_all_logs' => __('Delete All Logs', 'wp-polls'),
246
+ 'text_checkbox_delete_all_logs' => __('Please check the \\\'Yes\\\' checkbox if you want to delete all logs.', 'wp-polls'),
247
+ 'text_delete_poll_logs' => __('Delete Logs For This Poll Only', 'wp-polls'),
248
+ 'text_checkbox_delete_poll_logs' => __('Please check the \\\'Yes\\\' checkbox if you want to delete all logs for this poll ONLY.', 'wp-polls'),
249
+ 'text_delete_poll_ans' => __('Delete Poll Answer', 'wp-polls'),
250
+ 'text_open_poll' => __('Open Poll', 'wp-polls'),
251
+ 'text_close_poll' => __('Close Poll', 'wp-polls'),
252
+ 'text_answer' => __('Answer', 'wp-polls'),
253
+ 'text_remove_poll_answer' => __('Remove', 'wp-polls')
254
+ ));
255
+ }
256
  }
257
 
258
 
259
  ### Function: Displays Polls Footer In WP-Admin
260
+ add_action('admin_footer-post-new.php', 'poll_footer_admin');
261
+ add_action('admin_footer-post.php', 'poll_footer_admin');
262
+ add_action('admin_footer-page-new.php', 'poll_footer_admin');
263
+ add_action('admin_footer-page.php', 'poll_footer_admin');
264
+ function poll_footer_admin() {
265
+ // Javascript Code Courtesy Of WP-AddQuicktag (http://bueltge.de/wp-addquicktags-de-plugin/120/)
266
  echo '<script type="text/javascript">'."\n";
267
  echo '/* <![CDATA[ */'."\n";
268
+ echo "\t".'var pollsEdL10n = {'."\n";
269
+ echo "\t\t".'enter_poll_id: "'.js_escape(__('Enter Poll ID', 'wp-polls')).'",'."\n";
270
+ echo "\t\t".'enter_poll_id_again: "'.js_escape(__('Error: Poll ID must be numeric', 'wp-polls')).'\n\n'.js_escape(__('Please enter Poll ID again', 'wp-polls')).'",'."\n";
271
+ echo "\t\t".'poll: "'.js_escape(__('Poll', 'wp-polls')).'",'."\n";
272
+ echo "\t\t".'insert_poll: "'.js_escape(__('Insert_Poll', 'wp-polls')).'",'."\n";
273
+ echo "\t".'};'."\n";
274
  echo "\t".'function insertPoll(where, myField) {'."\n";
275
+ echo "\t\t".'var poll_id = jQuery.trim(prompt(pollsEdL10n.enter_poll_id));'."\n";
276
  echo "\t\t".'while(isNaN(poll_id)) {'."\n";
277
+ echo "\t\t\t".'poll_id = jQuery.trim(prompt(pollsEdL10n.enter_poll_id_again));'."\n";
278
  echo "\t\t".'}'."\n";
279
+ echo "\t\t".'if (poll_id >= -1 && poll_id != null && poll_id != "") {'."\n";
280
  echo "\t\t\t".'if(where == \'code\') {'."\n";
281
  echo "\t\t\t\t".'edInsertContent(myField, \'[poll id="\' + poll_id + \'"]\');'."\n";
282
  echo "\t\t\t".'} else {'."\n";
284
  echo "\t\t\t".'}'."\n";
285
  echo "\t\t".'}'."\n";
286
  echo "\t".'}'."\n";
 
287
  echo "\t".'if(document.getElementById("ed_toolbar")){'."\n";
288
  echo "\t\t".'qt_toolbar = document.getElementById("ed_toolbar");'."\n";
289
+ echo "\t\t".'edButtons[edButtons.length] = new edButton("ed_poll",pollsEdL10n.poll, "", "","");'."\n";
290
  echo "\t\t".'var qt_button = qt_toolbar.lastChild;'."\n";
291
  echo "\t\t".'while (qt_button.nodeType != 1){'."\n";
292
  echo "\t\t\t".'qt_button = qt_button.previousSibling;'."\n";
293
  echo "\t\t".'}'."\n";
294
  echo "\t\t".'qt_button = qt_button.cloneNode(true);'."\n";
295
+ echo "\t\t".'qt_button.value = pollsEdL10n.poll;'."\n";
296
+ echo "\t\t".'qt_button.title = pollsEdL10n.insert_poll;'."\n";
297
  echo "\t\t".'qt_button.onclick = function () { insertPoll(\'code\', edCanvas);}'."\n";
298
  echo "\t\t".'qt_button.id = "ed_poll";'."\n";
299
  echo "\t\t".'qt_toolbar.appendChild(qt_button);'."\n";
303
  }
304
 
305
 
306
+ ### Function: Add Favourite Actions >= WordPress 2.7
307
+ add_filter('favorite_actions', 'poll_favorite_actions');
308
+ function poll_favorite_actions($favorite_actions) {
309
+ $favorite_actions['admin.php?page=wp-polls/polls-add.php'] = array(__('Add Poll', 'wp-polls'), 'manage_polls');
310
+ return $favorite_actions;
311
+ }
312
+
313
+
314
  ### Function: Add Quick Tag For Poll In TinyMCE >= WordPress 2.5
315
  add_action('init', 'poll_tinymce_addbuttons');
316
  function poll_tinymce_addbuttons() {
426
  function check_voted_username($poll_id) {
427
  global $wpdb, $user_ID;
428
  // Check IP If User Is Guest
429
+ if (!is_user_logged_in()) {
430
+ return 1;
431
  }
432
  $pollsip_userid = intval($user_ID);
433
  $log_expiry = intval(get_option('poll_cookielog_expiry'));
446
 
447
 
448
  ### Function: Display Voting Form
449
+ function display_pollvote($poll_id, $display_loading = true) {
450
  global $wpdb;
451
  // Temp Poll Result
452
  $temp_pollvote = '';
482
  // If There Is Poll Question With Answers
483
  if($poll_question && $poll_answers) {
484
  // Display Poll Voting Form
485
+ $temp_pollvote .= "<div id=\"polls-$poll_question_id\" class=\"wp-polls\">\n";
486
+ $temp_pollvote .= "\t<form id=\"polls_form_$poll_question_id\" class=\"wp-polls-form\" action=\"".htmlspecialchars($_SERVER['REQUEST_URI'])."\" method=\"post\">\n";
487
+ $temp_pollvote .= "\t\t<p style=\"display: none;\"><input type=\"hidden\" name=\"poll_id\" value=\"$poll_question_id\" /></p>\n";
488
+ if($poll_multiple_ans > 0) {
489
+ $temp_pollvote .= "\t\t<p style=\"display: none;\"><input type=\"hidden\" id=\"poll_multiple_ans_$poll_question_id\" name=\"poll_multiple_ans_$poll_question_id\" value=\"$poll_multiple_ans\" /></p>\n";
 
 
 
 
490
  }
491
+ // Print Out Voting Form Header Template
492
+ $temp_pollvote .= "\t\t$template_question\n";
493
  foreach($poll_answers as $poll_answer) {
494
  // Poll Answer Variables
495
  $poll_answer_id = intval($poll_answer->polla_aid);
531
  }
532
  // Print Out Voting Form Footer Template
533
  $temp_pollvote .= "\t\t$template_footer\n";
534
+ $temp_pollvote .= "\t</form>\n";
535
+ $temp_pollvote .= "</div>\n";
536
+ if($display_loading) {
537
  $poll_ajax_style = get_option('poll_ajax_style');
538
  if(intval($poll_ajax_style['loading']) == 1) {
539
  $temp_pollvote .= "<div id=\"polls-$poll_question_id-loading\" class=\"wp-polls-loading\"><img src=\"".plugins_url('wp-polls/images/loading.gif')."\" width=\"16\" height=\"16\" alt=\"".__('Loading', 'wp-polls')." ...\" title=\"".__('Loading', 'wp-polls')." ...\" class=\"wp-polls-image\" />&nbsp;".__('Loading', 'wp-polls')." ...</div>\n";
540
  }
541
+ }
542
  } else {
543
  $temp_pollvote .= stripslashes(get_option('poll_template_disable'));
544
  }
548
 
549
 
550
  ### Function: Display Results Form
551
+ function display_pollresult($poll_id, $user_voted = '', $display_loading = true) {
552
  global $wpdb;
553
  // User Voted
554
  if(!is_array($user_voted)) {
595
  $poll_answers = $wpdb->get_results("SELECT polla_aid, polla_answers, polla_votes FROM $wpdb->pollsa WHERE polla_qid = $poll_question_id ORDER BY ".get_option('poll_ans_result_sortby').' '.get_option('poll_ans_result_sortorder'));
596
  // If There Is Poll Question With Answers
597
  if($poll_question && $poll_answers) {
598
+ // Store The Percentage Of The Poll
599
+ $poll_answer_percentage_array = array();
600
  // Is The Poll Total Votes 0?
601
  $poll_totalvotes_zero = true;
602
  if($poll_question_totalvotes > 0) {
603
  $poll_totalvotes_zero = false;
604
  }
605
  // Print Out Result Header Template
606
+ $temp_pollresult .= "<div id=\"polls-$poll_question_id\" class=\"wp-polls\">\n";
607
+ $temp_pollresult .= "\t\t$template_question\n";
 
 
608
  foreach($poll_answers as $poll_answer) {
609
  // Poll Answer Variables
610
  $poll_answer_id = intval($poll_answer->polla_aid);
628
  $poll_answer_percentage = 0;
629
  $poll_answer_imagewidth = 1;
630
  }
631
+ // Make Sure That Total Percentage Is 100% By Adding A Buffer To The Last Poll Answer
632
+ if($poll_multiple_ans == 0) {
633
+ $poll_answer_percentage_array[] = $poll_answer_percentage;
634
+ if(sizeof($poll_answer_percentage_array) == sizeof($poll_answers)) {
635
+ $percentage_error_buffer = 100 - array_sum($poll_answer_percentage_array);
636
+ $poll_answer_percentage = $poll_answer_percentage + $percentage_error_buffer;
637
+ }
638
+ }
639
  // Let User See What Options They Voted
640
  if(in_array($poll_answer_id, $user_voted)) {
641
  // Results Body Variables
644
  $template_answer = str_replace("%POLL_ANSWER%", $poll_answer_text, $template_answer);
645
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($poll_answer_text)), $template_answer);
646
  $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($poll_answer_votes), $template_answer);
647
+ $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
648
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
649
  // Print Out Results Body Template
650
  $temp_pollresult .= "\t\t$template_answer\n";
655
  $template_answer = str_replace("%POLL_ANSWER%", $poll_answer_text, $template_answer);
656
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($poll_answer_text)), $template_answer);
657
  $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($poll_answer_votes), $template_answer);
658
+ $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
659
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
660
  // Print Out Results Body Template
661
  $temp_pollresult .= "\t\t$template_answer\n";
689
  $template_footer = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($poll_question_totalvoters), $template_footer);
690
  $template_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_footer);
691
  $template_footer = str_replace("%POLL_MOST_VOTES%", number_format_i18n($poll_most_votes), $template_footer);
692
+ $template_footer = str_replace("%POLL_MOST_PERCENTAGE%", $poll_most_percentage, $template_footer);
693
  $template_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_footer);
694
  $template_footer = str_replace("%POLL_LEAST_VOTES%", number_format_i18n($poll_least_votes), $template_footer);
695
+ $template_footer = str_replace("%POLL_LEAST_PERCENTAGE%", $poll_least_percentage, $template_footer);
696
  if($poll_multiple_ans > 0) {
697
  $template_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $poll_multiple_ans, $template_footer);
698
  } else {
700
  }
701
  // Print Out Results Footer Template
702
  $temp_pollresult .= "\t\t$template_footer\n";
703
+ $temp_pollresult .= "</div>\n";
704
+ if($display_loading) {
705
  $poll_ajax_style = get_option('poll_ajax_style');
706
  if(intval($poll_ajax_style['loading']) == 1) {
707
  $temp_pollresult .= "<div id=\"polls-$poll_question_id-loading\" class=\"wp-polls-loading\"><img src=\"".plugins_url('wp-polls/images/loading.gif')."\" width=\"16\" height=\"16\" alt=\"".__('Loading', 'wp-polls')." ...\" title=\"".__('Loading', 'wp-polls')." ...\" class=\"wp-polls-image\" />&nbsp;".__('Loading', 'wp-polls')." ...</div>\n";
708
  }
709
+ }
710
  } else {
711
  $temp_pollresult .= stripslashes(get_option('poll_template_disable'));
712
  }
727
  $ip_address = explode(',', $ip_address);
728
  $ip_address = $ip_address[0];
729
  }
730
+ return esc_attr($ip_address);
731
  }
732
  }
733
 
812
 
813
 
814
  ### Function: Check Voted To Get Voted Answer
815
+ function check_voted_multiple($poll_id, $polls_ips) {
 
 
816
  if(!empty($_COOKIE["voted_$poll_id"])) {
817
+ return explode(',', $_COOKIE["voted_$poll_id"]);
818
  } else {
819
  if($polls_ips) {
820
+ return $polls_ips;
821
+ } else {
822
+ return array();
 
 
823
  }
824
  }
 
825
  }
826
 
827
 
841
 
842
  ### Function: Displays Polls Archive Link
843
  function display_polls_archive_link($display = true) {
844
+ $template_pollarchivelink = stripslashes(get_option('poll_template_pollarchivelink'));
845
+ $template_pollarchivelink = str_replace("%POLL_ARCHIVE_URL%", get_option('poll_archive_url'), $template_pollarchivelink);
846
+ if($display) {
847
+ echo $template_pollarchivelink;
848
+ } else{
849
+ return $template_pollarchivelink;
 
 
850
  }
851
  }
852
 
853
 
854
  ### Function: Display Polls Archive
855
  function polls_archive() {
856
+ global $wpdb, $in_pollsarchive;
857
  // Polls Variables
858
  $in_pollsarchive = true;
859
  $page = intval($_GET['poll_page']);
935
  $answers = $wpdb->get_results("SELECT polla_aid, polla_qid, polla_answers, polla_votes FROM $wpdb->pollsa WHERE polla_qid IN ($poll_questions_ids) ORDER BY ".get_option('poll_ans_result_sortby').' '.get_option('poll_ans_result_sortorder'));
936
  if($answers) {
937
  foreach($answers as $answer) {
938
+ $polls_answers[intval($answer->polla_qid)][] = array('aid' => intval($answer->polla_aid), 'qid' => intval($answer->polla_qid), 'answers' => stripslashes($answer->polla_answers), 'votes' => intval($answer->polla_votes));
939
  }
940
  }
941
 
942
  // Get Poll IPs
943
+ $ips = $wpdb->get_results("SELECT pollip_qid, pollip_aid FROM $wpdb->pollsip WHERE pollip_qid IN ($poll_questions_ids) AND pollip_ip = '".get_ipaddress()."' ORDER BY pollip_qid ASC");
944
  if($ips) {
945
  foreach($ips as $ip) {
946
+ $polls_ips[intval($ip->pollip_qid)][] = intval($ip->pollip_aid);
947
  }
948
  }
 
949
  // Poll Archives
950
  $pollsarchive_output_archive .= "<div class=\"wp-polls wp-polls-archive\">\n";
951
  foreach($polls_questions as $polls_question) {
985
  // Print Out Result Header Template
986
  $pollsarchive_output_archive .= $template_archive_header;
987
  $pollsarchive_output_archive .= $template_question;
988
+ // Store The Percentage Of The Poll
989
+ $poll_answer_percentage_array = array();
990
+ foreach($polls_answers[$polls_question['id']] as $polls_answer) {
991
+ // Calculate Percentage And Image Bar Width
992
+ if(!$poll_totalvotes_zero) {
993
+ if($polls_answer['votes'] > 0) {
994
+ $poll_answer_percentage = round((($polls_answer['votes']/$polls_question['totalvoters'])*100));
995
+ $poll_answer_imagewidth = round($poll_answer_percentage*0.9);
 
 
 
996
  } else {
997
  $poll_answer_percentage = 0;
998
  $poll_answer_imagewidth = 1;
999
  }
1000
+ } else {
1001
+ $poll_answer_percentage = 0;
1002
+ $poll_answer_imagewidth = 1;
1003
+ }
1004
+ // Make Sure That Total Percentage Is 100% By Adding A Buffer To The Last Poll Answer
1005
+ if($polls_question['multiple'] == 0) {
1006
+ $poll_answer_percentage_array[] = $poll_answer_percentage;
1007
+ if(sizeof($poll_answer_percentage_array) == sizeof($polls_answers[$polls_question['id']])) {
1008
+ $percentage_error_buffer = 100 - array_sum($poll_answer_percentage_array);
1009
+ $poll_answer_percentage = $poll_answer_percentage + $percentage_error_buffer;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1010
  }
1011
+ }
1012
+ // Let User See What Options They Voted
1013
+ if(in_array($polls_answer['aid'], check_voted_multiple($polls_question['id'], $polls_ips[$polls_question['id']]))) {
1014
+ // Results Body Variables
1015
+ $template_answer = stripslashes(get_option('poll_template_resultbody2'));
1016
+ $template_answer = str_replace("%POLL_ANSWER_ID%", $polls_answer['aid'], $template_answer);
1017
+ $template_answer = str_replace("%POLL_ANSWER%", $polls_answer['answers'], $template_answer);
1018
+ $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($polls_answer['answers'])), $template_answer);
1019
+ $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($polls_answer['votes']), $template_answer);
1020
+ $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
1021
+ $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
1022
+ // Print Out Results Body Template
1023
+ $pollsarchive_output_archive .= $template_answer;
1024
+ } else {
1025
+ // Results Body Variables
1026
+ $template_answer = stripslashes(get_option('poll_template_resultbody'));
1027
+ $template_answer = str_replace("%POLL_ANSWER_ID%", $polls_answer['aid'], $template_answer);
1028
+ $template_answer = str_replace("%POLL_ANSWER%", $polls_answer['answers'], $template_answer);
1029
+ $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($polls_answer['answers'])), $template_answer);
1030
+ $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($polls_answer['votes']), $template_answer);
1031
+ $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
1032
+ $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
1033
+ // Print Out Results Body Template
1034
+ $pollsarchive_output_archive .= $template_answer;
1035
+ }
1036
+ // Get Most Voted Data
1037
+ if($polls_answer['votes'] > $poll_most_votes) {
1038
+ $poll_most_answer = $polls_answer['answers'];
1039
+ $poll_most_votes = $polls_answer['votes'];
1040
+ $poll_most_percentage = $poll_answer_percentage;
1041
+ }
1042
+ // Get Least Voted Data
1043
+ if($poll_least_votes == 0) {
1044
+ $poll_least_votes = $polls_answer['votes'];
1045
+ }
1046
+ if($polls_answer['votes'] <= $poll_least_votes) {
1047
+ $poll_least_answer = $polls_answer['answers'];
1048
+ $poll_least_votes = $polls_answer['votes'];
1049
+ $poll_least_percentage = $poll_answer_percentage;
1050
  }
1051
  }
1052
  // Results Footer Variables
1057
  $template_footer = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($polls_question['totalvoters']), $template_footer);
1058
  $template_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_footer);
1059
  $template_footer = str_replace("%POLL_MOST_VOTES%", number_format_i18n($poll_most_votes), $template_footer);
1060
+ $template_footer = str_replace("%POLL_MOST_PERCENTAGE%", $poll_most_percentage, $template_footer);
1061
  $template_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_footer);
1062
  $template_footer = str_replace("%POLL_LEAST_VOTES%", number_format_i18n($poll_least_votes), $template_footer);
1063
+ $template_footer = str_replace("%POLL_LEAST_PERCENTAGE%", $poll_least_percentage, $template_footer);
1064
  if($polls_question['multiple'] > 0) {
1065
  $template_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $polls_question['multiple'], $template_footer);
1066
  } else {
1074
  $template_archive_footer = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($polls_question['totalvoters']), $template_archive_footer);
1075
  $template_archive_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_archive_footer);
1076
  $template_archive_footer = str_replace("%POLL_MOST_VOTES%", number_format_i18n($poll_most_votes), $template_archive_footer);
1077
+ $template_archive_footer = str_replace("%POLL_MOST_PERCENTAGE%", $poll_most_percentage, $template_archive_footer);
1078
  $template_archive_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_archive_footer);
1079
  $template_archive_footer = str_replace("%POLL_LEAST_VOTES%", number_format_i18n($poll_least_votes), $template_archive_footer);
1080
+ $template_archive_footer = str_replace("%POLL_LEAST_PERCENTAGE%", $poll_least_percentage, $template_archive_footer);
1081
  if($polls_question['multiple'] > 0) {
1082
  $template_archive_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $polls_question['multiple'], $template_archive_footer);
1083
  } else {
1209
  function cron_polls_place() {
1210
  wp_clear_scheduled_hook('polls_cron');
1211
  if (!wp_next_scheduled('polls_cron')) {
1212
+ wp_schedule_event(time(), 'twicedaily', 'polls_cron');
1213
  }
1214
  }
1215
 
1260
  function vote_poll() {
1261
  global $wpdb, $user_identity, $user_ID;
1262
  if(!empty($_POST['vote'])) {
1263
+ polls_textdomain();
1264
  header('Content-Type: text/html; charset='.get_option('blog_charset').'');
1265
  $poll_id = intval($_POST['poll_id']);
1266
  $poll_aid = $_POST["poll_$poll_id"];
1267
+ $poll_aid_array = array_unique(array_map('intval', explode(',', $poll_aid)));
1268
  if($poll_id > 0 && !empty($poll_aid_array) && check_allowtovote()) {
1269
  $check_voted = check_voted($poll_id);
1270
  if($check_voted == 0) {
1271
  if(!empty($user_identity)) {
1272
+ $pollip_user = htmlspecialchars(addslashes($user_identity));
1273
  } elseif(!empty($_COOKIE['comment_author_'.COOKIEHASH])) {
1274
+ $pollip_user = htmlspecialchars(addslashes($_COOKIE['comment_author_'.COOKIEHASH]));
1275
  } else {
1276
  $pollip_user = __('Guest', 'wp-polls');
1277
  }
1286
  if($cookie_expiry == 0) {
1287
  $cookie_expiry = 30000000;
1288
  }
1289
+ $vote_cookie = setcookie('voted_'.$poll_id, $poll_aid, ($pollip_timestamp + $cookie_expiry), COOKIEPATH);
1290
  }
1291
+ $i = 0;
1292
  foreach($poll_aid_array as $polla_aid) {
1293
+ $update_polla_votes = $wpdb->query("UPDATE $wpdb->pollsa SET polla_votes = (polla_votes+1) WHERE polla_qid = $poll_id AND polla_aid = $polla_aid");
1294
+ if(!$update_polla_votes) {
1295
+ unset($poll_aid_array[$i]);
1296
+ }
1297
+ $i++;
1298
  }
1299
  $vote_q = $wpdb->query("UPDATE $wpdb->pollsq SET pollq_totalvotes = (pollq_totalvotes+".sizeof($poll_aid_array)."), pollq_totalvoters = (pollq_totalvoters+1) WHERE pollq_id = $poll_id AND pollq_active = 1");
1300
  if($vote_q) {
1301
  foreach($poll_aid_array as $polla_aid) {
1302
  $wpdb->query("INSERT INTO $wpdb->pollsip VALUES (0, $poll_id, $polla_aid, '$pollip_ip', '$pollip_host', '$pollip_timestamp', '$pollip_user', $pollip_userid)");
1303
  }
1304
+ echo display_pollresult($poll_id,$poll_aid_array, false);
1305
  exit();
1306
  } else {
1307
  printf(__('Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s', 'wp-polls'), $poll_id);
1318
  } elseif (intval($_GET['pollresult']) > 0) {
1319
  header('Content-Type: text/html; charset='.get_option('blog_charset').'');
1320
  $poll_id = intval($_GET['pollresult']);
1321
+ echo display_pollresult($poll_id, 0, false);
1322
  exit();
1323
  } elseif (intval($_GET['pollbooth']) > 0) {
1324
  header('Content-Type: text/html; charset='.get_option('blog_charset').'');
1325
  $poll_id = intval($_GET['pollbooth']);
1326
+ echo display_pollvote($poll_id, false);
1327
  exit();
1328
  } // End if(!empty($_POST['vote']))
1329
  }
1354
  if($stats_display['polls'] == 1) {
1355
  $content .= '<p><strong>'.__('WP-Polls', 'wp-polls').'</strong></p>'."\n";
1356
  $content .= '<ul>'."\n";
1357
+ $content .= '<li>'.sprintf(_n('<strong>%s</strong> poll was created.', '<strong>%s</strong> polls were created.', get_pollquestions(false), 'wp-polls'), number_format_i18n(get_pollquestions(false))).'</li>'."\n";
1358
+ $content .= '<li>'.sprintf(_n('<strong>%s</strong> polls\' answer was given.', '<strong>%s</strong> polls\' answers were given.', get_pollanswers(false), 'wp-polls'), number_format_i18n(get_pollanswers(false))).'</li>'."\n";
1359
+ $content .= '<li>'.sprintf(_n('<strong>%s</strong> vote was casted.', '<strong>%s</strong> votes were casted.', get_pollvotes(false), 'wp-polls'), number_format_i18n(get_pollvotes(false))).'</li>'."\n";
1360
  $content .= '</ul>'."\n";
1361
  }
1362
  return $content;
1363
  }
1364
 
1365
 
1366
+ ### Class: WP-Polls Widget
1367
+ class WP_Widget_Polls extends WP_Widget {
1368
+ // Constructor
1369
+ function WP_Widget_Polls() {
1370
+ $widget_ops = array('description' => __('WP-Polls polls', 'wp-polls'));
1371
+ $this->WP_Widget('polls-widget', __('Polls', 'wp-polls'), $widget_ops);
1372
+ }
1373
+
1374
+ // Display Widget
1375
+ function widget($args, $instance) {
1376
+ extract($args);
1377
+ $title = apply_filters('widget_title', esc_attr($instance['title']));
1378
+ $poll_id = intval($instance['poll_id']);
1379
+ $display_pollarchive = intval($instance['display_pollarchive']);
1380
+ echo $before_widget;
1381
+ if(!empty($title)) {
1382
+ echo $before_title.$title.$after_title;
1383
+ }
1384
+ get_poll($poll_id);
1385
+ if($display_pollarchive) {
1386
+ display_polls_archive_link();
1387
+ }
1388
+ echo $after_widget;
1389
+ }
1390
+
1391
+ // When Widget Control Form Is Posted
1392
+ function update($new_instance, $old_instance) {
1393
+ if (!isset($new_instance['submit'])) {
1394
+ return false;
1395
+ }
1396
+ $instance = $old_instance;
1397
+ $instance['title'] = strip_tags($new_instance['title']);
1398
+ $instance['poll_id'] = intval($new_instance['poll_id']);
1399
+ $instance['display_pollarchive'] = intval($new_instance['display_pollarchive']);
1400
+ return $instance;
1401
+ }
1402
+
1403
+ // DIsplay Widget Control Form
1404
+ function form($instance) {
1405
+ global $wpdb;
1406
+ $instance = wp_parse_args((array) $instance, array('title' => __('Polls', 'wp-polls'), 'poll_id' => 0, 'display_pollarchive' => 1));
1407
+ $title = esc_attr($instance['title']);
1408
+ $poll_id = intval($instance['poll_id']);
1409
+ $display_pollarchive = intval($instance['display_pollarchive']);
1410
+ ?>
1411
+ <p>
1412
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'wp-polls'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label>
1413
+ </p>
1414
+ <p>
1415
+ <label for="<?php echo $this->get_field_id('display_pollarchive'); ?>"><?php _e('Display Polls Archive Link Below Poll?', 'wp-polls'); ?>
1416
+ <select name="<?php echo $this->get_field_name('display_pollarchive'); ?>" id="<?php echo $this->get_field_id('display_pollarchive'); ?>" class="widefat">
1417
+ <option value="0"<?php selected(0, $display_pollarchive); ?>><?php _e('No', 'wp-polls'); ?></option>
1418
+ <option value="1"<?php selected(1, $display_pollarchive); ?>><?php _e('Yes', 'wp-polls'); ?></option>
1419
+ </select>
1420
+ </label>
1421
+ </p>
1422
+ <p>
1423
+ <label for="<?php echo $this->get_field_id('poll_id'); ?>"><?php _e('Poll To Display:', 'wp-polls'); ?>
1424
+ <select name="<?php echo $this->get_field_name('poll_id'); ?>" id="<?php echo $this->get_field_id('poll_id'); ?>" class="widefat">
1425
+ <option value="-1"<?php selected(-1, $poll_id); ?>><?php _e('Do NOT Display Poll (Disable)', 'wp-polls'); ?></option>
1426
+ <option value="-2"<?php selected(-2, $poll_id); ?>><?php _e('Display Random Poll', 'wp-polls'); ?></option>
1427
+ <option value="0"<?php selected(0, $poll_id); ?>><?php _e('Display Latest Poll', 'wp-polls'); ?></option>
1428
+ <optgroup>&nbsp;</optgroup>
1429
+ <?php
1430
+ $polls = $wpdb->get_results("SELECT pollq_id, pollq_question FROM $wpdb->pollsq ORDER BY pollq_id DESC");
1431
+ if($polls) {
1432
+ foreach($polls as $poll) {
1433
+ $pollq_question = stripslashes($poll->pollq_question);
1434
+ $pollq_id = intval($poll->pollq_id);
1435
+ if($pollq_id == $poll_id) {
1436
+ echo "<option value=\"$pollq_id\" selected=\"selected\">$pollq_question</option>\n";
1437
+ } else {
1438
+ echo "<option value=\"$pollq_id\">$pollq_question</option>\n";
1439
+ }
1440
+ }
1441
+ }
1442
+ ?>
1443
+ </select>
1444
+ </label>
1445
+ </p>
1446
+ <input type="hidden" id="<?php echo $this->get_field_id('submit'); ?>" name="<?php echo $this->get_field_name('submit'); ?>" value="1" />
1447
+ <?php
1448
+ }
1449
+ }
1450
+
1451
+
1452
+ ### Function: Init WP-Polls Widget
1453
+ add_action('widgets_init', 'widget_polls_init');
1454
+ function widget_polls_init() {
1455
+ register_widget('WP_Widget_Polls');
1456
+ }
1457
+
1458
+
1459
  ### Function: Create Poll Tables
1460
  add_action('activate_wp-polls/wp-polls.php', 'create_poll_table');
1461
  function create_poll_table() {
1462
  global $wpdb;
1463
+ polls_textdomain();
1464
  if(@is_file(ABSPATH.'/wp-admin/upgrade-functions.php')) {
1465
  include_once(ABSPATH.'/wp-admin/upgrade-functions.php');
1466
  } elseif(@is_file(ABSPATH.'/wp-admin/includes/upgrade.php')) {
1529
  '<ul class="wp-polls-ul">', 'Template For Poll\'s Question');
1530
  add_option('poll_template_votebody', '<li><input type="%POLL_CHECKBOX_RADIO%" id="poll-answer-%POLL_ANSWER_ID%" name="poll_%POLL_ID%" value="%POLL_ANSWER_ID%" /> <label for="poll-answer-%POLL_ANSWER_ID%">%POLL_ANSWER%</label></li>', 'Template For Poll\'s Answers');
1531
  add_option('poll_template_votefooter', '</ul>'.
1532
+ '<p style="text-align: center;"><input type="button" name="vote" value=" '.__('Vote', 'wp-polls').' " class="Buttons" onclick="poll_vote(%POLL_ID%);" /></p>'.
1533
+ '<p style="text-align: center;"><a href="#ViewPollResults" onclick="poll_result(%POLL_ID%); return false;" title="'.__('View Results Of This Poll', 'wp-polls').'">'.__('View Results', 'wp-polls').'</a></p>'.
1534
  '</div>', 'Template For Poll\'s Voting Footer');
1535
  add_option('poll_template_resultheader', '<p style="text-align: center;"><strong>%POLL_QUESTION%</strong></p>'.
1536
  '<div id="polls-%POLL_ID%-ans" class="wp-polls-ans">'.
1542
  '</div>', 'Template For Poll Result Footer');
1543
  add_option('poll_template_resultfooter2', '</ul>'.
1544
  '<p style="text-align: center;">'.__('Total Voters', 'wp-polls').': <strong>%POLL_TOTALVOTERS%</strong></p>'.
1545
+ '<p style="text-align: center;"><a href="#VotePoll" onclick="poll_booth(%POLL_ID%); return false;" title="'.__('Vote For This Poll', 'wp-polls').'">'.__('Vote', 'wp-polls').'</a></p>'.
1546
  '</div>', 'Template For Poll Result Footer');
1547
  add_option('poll_template_disable', __('Sorry, there are no polls available at the moment.', 'wp-polls'), 'Template For Poll When It Is Disabled');
1548
  add_option('poll_template_error', __('An error has occurred when processing your poll.', 'wp-polls'), 'Template For Poll When An Error Has Occured');
1560
  // Database Upgrade For WP-Polls 2.12
1561
  maybe_add_column($wpdb->pollsip, 'pollip_userid', "ALTER TABLE $wpdb->pollsip ADD pollip_userid INT( 10 ) NOT NULL DEFAULT '0';");
1562
  add_option('poll_archive_url', site_url('pollsarchive'), 'Polls Archive URL');
 
1563
  // Database Upgrade For WP-Polls 2.13
1564
  add_option('poll_bar', array('style' => 'default', 'background' => 'd8e1eb', 'border' => 'c8c8c8', 'height' => 8), 'Poll Bar Style');
1565
  // Database Upgrade For WP-Polls 2.14
1585
  add_option('poll_cookielog_expiry', 0, 'Cookie And Log Expiry Time');
1586
  add_option('poll_template_pollarchivepagingheader', '', 'Displayed Before Paging In The Poll Archive');
1587
  add_option('poll_template_pollarchivepagingfooter', '', 'Displayed After Paging In The Poll Archive');
1588
+ // Database Upgrade For WP-Polls 2.50
1589
+ delete_option('poll_archive_show');
1590
  // Set 'manage_polls' Capabilities To Administrator
1591
  $role = get_role('administrator');
1592
  if(!$role->has_cap('manage_polls')) {
1594
  }
1595
  cron_polls_place();
1596
  }
1597
+ ?>
wp-polls.pot CHANGED
@@ -1,25 +1,26 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WP-Polls 2.31\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2008-12-13 03:53+0800\n"
6
- "PO-Revision-Date: 2008-12-13 03:53+0800\n"
7
  "Last-Translator: Lester Chan <lesterchan@gmail.com>\n"
8
  "Language-Team: Lester Chan <lesterchan@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-Country: SINGAPORE\n"
13
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;__ngettext_noop:1,2\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-Language: English\n"
16
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
  #: polls-add.php:36
20
- #: polls-add.php:175
21
- #: polls-add.php:242
22
  #: wp-polls.php:64
 
23
  msgid "Add Poll"
24
  msgstr ""
25
 
@@ -40,119 +41,108 @@ msgid "Poll '%s' Added Successfully."
40
  msgstr ""
41
 
42
  #: polls-add.php:96
43
- #: polls-manager.php:461
44
  #: wp-polls.php:63
45
  msgid "Manage Polls"
46
  msgstr ""
47
 
48
- #: polls-add.php:124
49
- #: polls-logs.php:281
50
- #: polls-logs.php:324
51
- #: polls-manager.php:238
52
- msgid "Answer"
53
- msgstr ""
54
-
55
- #: polls-add.php:153
56
- msgid "You need at least a minimum of 2 poll answers."
57
- msgstr ""
58
-
59
- #: polls-add.php:177
60
- #: polls-manager.php:311
61
  msgid "Poll Question"
62
  msgstr ""
63
 
64
- #: polls-add.php:180
65
- #: polls-manager.php:314
66
- #: polls-manager.php:468
67
  msgid "Question"
68
  msgstr ""
69
 
70
- #: polls-add.php:185
71
- #: polls-manager.php:319
72
  msgid "Poll Answers"
73
  msgstr ""
74
 
75
- #: polls-add.php:190
76
- #: polls-manager.php:354
77
  msgid "Add Answer"
78
  msgstr ""
79
 
80
- #: polls-add.php:190
81
- #: polls-manager.php:354
82
- msgid "Remove Answer"
83
- msgstr ""
84
-
85
- #: polls-add.php:197
86
- #: polls-manager.php:341
87
  #, php-format
88
  msgid "Answer %s"
89
  msgstr ""
90
 
91
- #: polls-add.php:206
92
- #: polls-manager.php:365
 
 
 
 
 
93
  msgid "Poll Multiple Answers"
94
  msgstr ""
95
 
96
- #: polls-add.php:209
97
- #: polls-manager.php:368
98
  msgid "Allows Users To Select More Than One Answer?"
99
  msgstr ""
100
 
101
- #: polls-add.php:212
102
- #: polls-manager.php:371
103
- #: polls-options.php:207
104
- #: polls-options.php:216
105
- #: polls-options.php:333
106
- #: wp-polls-widget.php:105
107
  msgid "No"
108
  msgstr ""
109
 
110
- #: polls-add.php:213
111
  #: polls-logs.php:373
112
- #: polls-manager.php:372
113
- #: polls-manager.php:597
114
- #: polls-options.php:208
115
- #: polls-options.php:217
116
- #: polls-options.php:334
117
  #: polls-uninstall.php:134
118
- #: wp-polls-widget.php:110
119
  msgid "Yes"
120
  msgstr ""
121
 
122
- #: polls-add.php:218
123
- #: polls-manager.php:377
124
  msgid "Maximum Number Of Selected Answers Allowed?"
125
  msgstr ""
126
 
127
- #: polls-add.php:231
128
- #: polls-manager.php:394
129
  msgid "Poll Start/End Date"
130
  msgstr ""
131
 
132
- #: polls-add.php:234
133
- #: polls-manager.php:397
134
- #: polls-manager.php:470
135
  msgid "Start Date/Time"
136
  msgstr ""
137
 
138
- #: polls-add.php:238
139
- #: polls-manager.php:405
140
- #: polls-manager.php:471
141
  msgid "End Date/Time"
142
  msgstr ""
143
 
144
- #: polls-add.php:239
145
- #: polls-manager.php:416
146
  msgid "Do NOT Expire This Poll"
147
  msgstr ""
148
 
149
- #: polls-add.php:242
150
- #: polls-manager.php:442
151
  msgid "Cancel"
152
  msgstr ""
153
 
154
  #: polls-admin-ajax.php:43
155
- #: polls-manager.php:598
156
  #: wp-polls.php:245
157
  msgid "Delete All Logs"
158
  msgstr ""
@@ -197,7 +187,7 @@ msgid "Error In Deleting Poll Answer '%s'."
197
  msgstr ""
198
 
199
  #: polls-admin-ajax.php:83
200
- #: polls-manager.php:441
201
  #: wp-polls.php:250
202
  msgid "Open Poll"
203
  msgstr ""
@@ -213,7 +203,7 @@ msgid "Error Opening Poll '%s'"
213
  msgstr ""
214
 
215
  #: polls-admin-ajax.php:94
216
- #: polls-manager.php:440
217
  #: wp-polls.php:251
218
  msgid "Close Poll"
219
  msgstr ""
@@ -250,7 +240,7 @@ msgstr ""
250
  #: polls-logs.php:69
251
  #: polls-logs.php:102
252
  #: polls-logs.php:105
253
- #: wp-polls.php:1258
254
  msgid "Guest"
255
  msgstr ""
256
 
@@ -375,6 +365,12 @@ msgstr ""
375
  msgid "This default filter is limited to display only <strong>100</strong> records."
376
  msgstr ""
377
 
 
 
 
 
 
 
378
  #: polls-logs.php:282
379
  msgid "IP"
380
  msgstr ""
@@ -390,16 +386,16 @@ msgstr ""
390
 
391
  #: polls-logs.php:291
392
  #: polls-logs.php:319
393
- #: polls-manager.php:399
394
- #: polls-manager.php:411
395
- #: polls-manager.php:491
396
- #: polls-manager.php:499
397
- #: wp-polls.php:446
398
- #: wp-polls.php:451
399
- #: wp-polls.php:562
400
- #: wp-polls.php:567
401
- #: wp-polls.php:952
402
- #: wp-polls.php:956
403
  #, php-format
404
  msgid "%s @ %s"
405
  msgstr ""
@@ -445,13 +441,13 @@ msgid "You are about to delete poll logs for this poll '%s' ONLY. This action is
445
  msgstr ""
446
 
447
  #: polls-logs.php:381
448
- #: polls-manager.php:605
449
  msgid "Note: If your logging method is by IP and Cookie or by Cookie, users may still be unable to vote if they have voted before as the cookie is still stored in their computer."
450
  msgstr ""
451
 
452
  #: polls-manager.php:39
453
- #: polls-manager.php:309
454
- #: polls-manager.php:430
455
  msgid "Edit Poll"
456
  msgstr ""
457
 
@@ -485,167 +481,164 @@ msgstr ""
485
  msgid "Poll '%s' Edited Successfully."
486
  msgstr ""
487
 
488
- #: polls-manager.php:280
489
- msgid "No more poll's answer to be removed."
490
- msgstr ""
491
-
492
- #: polls-manager.php:323
493
  msgid "Answer No."
494
  msgstr ""
495
 
496
- #: polls-manager.php:324
497
  msgid "Answer Text"
498
  msgstr ""
499
 
500
- #: polls-manager.php:325
501
  msgid "No. Of Votes"
502
  msgstr ""
503
 
504
- #: polls-manager.php:334
505
  msgid "Null Votes"
506
  msgstr ""
507
 
508
- #: polls-manager.php:343
509
- #: polls-manager.php:546
510
  msgid "Delete"
511
  msgstr ""
512
 
513
- #: polls-manager.php:343
514
  #, php-format
515
  msgid "You are about to delete this poll's answer '%s'."
516
  msgstr ""
517
 
518
- #: polls-manager.php:355
519
  msgid "Total Votes:"
520
  msgstr ""
521
 
522
- #: polls-manager.php:360
523
- #: polls-manager.php:580
524
  msgid "Total Voters:"
525
  msgstr ""
526
 
527
- #: polls-manager.php:400
528
  msgid "Edit Start Date/Time"
529
  msgstr ""
530
 
531
- #: polls-manager.php:409
532
  msgid "This Poll Will Not Expire"
533
  msgstr ""
534
 
535
- #: polls-manager.php:440
536
  #, php-format
537
  msgid "You are about to CLOSE this poll '%s'."
538
  msgstr ""
539
 
540
- #: polls-manager.php:441
541
  #, php-format
542
  msgid "You are about to OPEN this poll '%s'."
543
  msgstr ""
544
 
545
- #: polls-manager.php:462
546
- #: wp-polls-widget.php:64
547
  #: wp-polls.php:60
 
 
548
  msgid "Polls"
549
  msgstr ""
550
 
551
- #: polls-manager.php:467
552
  msgid "ID"
553
  msgstr ""
554
 
555
- #: polls-manager.php:469
556
  #: polls-templates.php:122
557
  #: polls-templates.php:125
558
- #: wp-polls.php:1425
559
- #: wp-polls.php:1428
560
  msgid "Total Voters"
561
  msgstr ""
562
 
563
- #: polls-manager.php:472
564
  msgid "Status"
565
  msgstr ""
566
 
567
- #: polls-manager.php:473
568
  msgid "Action"
569
  msgstr ""
570
 
571
- #: polls-manager.php:497
572
- #: wp-polls.php:449
573
- #: wp-polls.php:565
574
- #: wp-polls.php:954
575
  msgid "No Expiry"
576
  msgstr ""
577
 
578
- #: polls-manager.php:522
579
- #: polls-manager.php:526
580
- #: polls-manager.php:529
581
  msgid "Displayed:"
582
  msgstr ""
583
 
584
- #: polls-manager.php:537
585
  msgid "Open"
586
  msgstr ""
587
 
588
- #: polls-manager.php:539
589
  msgid "Future"
590
  msgstr ""
591
 
592
- #: polls-manager.php:541
593
  msgid "Closed"
594
  msgstr ""
595
 
596
- #: polls-manager.php:544
597
  msgid "Logs"
598
  msgstr ""
599
 
600
- #: polls-manager.php:545
601
  msgid "Edit"
602
  msgstr ""
603
 
604
- #: polls-manager.php:546
605
  #, php-format
606
  msgid "You are about to delete this poll, '%s'."
607
  msgstr ""
608
 
609
- #: polls-manager.php:554
610
  msgid "No Polls Found"
611
  msgstr ""
612
 
613
- #: polls-manager.php:564
614
  msgid "Polls Stats:"
615
  msgstr ""
616
 
617
- #: polls-manager.php:568
618
  msgid "Total Polls:"
619
  msgstr ""
620
 
621
- #: polls-manager.php:572
622
  msgid "Total Polls' Answers:"
623
  msgstr ""
624
 
625
- #: polls-manager.php:576
626
  msgid "Total Votes Casted:"
627
  msgstr ""
628
 
629
- #: polls-manager.php:589
630
  msgid "Polls Logs"
631
  msgstr ""
632
 
633
- #: polls-manager.php:596
634
  msgid "Are You Sure You Want To Delete All Polls Logs?"
635
  msgstr ""
636
 
637
- #: polls-manager.php:598
638
  msgid "You are about to delete all poll logs. This action is not reversible."
639
  msgstr ""
640
 
641
- #: polls-manager.php:601
642
  #: wp-polls.php:244
643
  msgid "No poll logs available."
644
  msgstr ""
645
 
646
  #: polls-options.php:70
647
- #: polls-options.php:138
648
- #: polls-options.php:141
649
  msgid "Poll Bar Style"
650
  msgstr ""
651
 
@@ -694,7 +687,7 @@ msgid "Poll Close Option"
694
  msgstr ""
695
 
696
  #: polls-options.php:82
697
- #: polls-options.php:288
698
  msgid "Logging Method"
699
  msgstr ""
700
 
@@ -716,236 +709,230 @@ msgstr ""
716
  msgid "No Poll Option Updated"
717
  msgstr ""
718
 
719
- #: polls-options.php:136
720
  #: wp-polls.php:65
721
  msgid "Poll Options"
722
  msgstr ""
723
 
724
- #: polls-options.php:168
725
  msgid "Use CSS Style"
726
  msgstr ""
727
 
728
- #: polls-options.php:172
729
  msgid "Poll Bar Background"
730
  msgstr ""
731
 
732
- #: polls-options.php:177
733
  msgid "Poll Bar Border"
734
  msgstr ""
735
 
736
- #: polls-options.php:182
737
  msgid "Poll Bar Height"
738
  msgstr ""
739
 
740
- #: polls-options.php:186
741
  msgid "Your poll bar will look like this"
742
  msgstr ""
743
 
744
- #: polls-options.php:201
745
  msgid "Polls AJAX Style"
746
  msgstr ""
747
 
748
- #: polls-options.php:204
749
  msgid "Show Loading Image With Text"
750
  msgstr ""
751
 
752
- #: polls-options.php:213
753
  msgid "Show Fading In And Fading Out Of Poll"
754
  msgstr ""
755
 
756
- #: polls-options.php:224
757
  msgid "Sorting Of Poll Answers"
758
  msgstr ""
759
 
760
- #: polls-options.php:227
761
  msgid "Sort Poll Answers By:"
762
  msgstr ""
763
 
764
- #: polls-options.php:230
765
- #: polls-options.php:255
766
  msgid "Exact Order"
767
  msgstr ""
768
 
769
- #: polls-options.php:231
770
- #: polls-options.php:256
771
  msgid "Alphabetical Order"
772
  msgstr ""
773
 
774
- #: polls-options.php:232
775
- #: polls-options.php:257
776
  msgid "Random Order"
777
  msgstr ""
778
 
779
- #: polls-options.php:237
780
  msgid "Sort Order Of Poll Answers:"
781
  msgstr ""
782
 
783
- #: polls-options.php:240
784
- #: polls-options.php:265
785
  msgid "Ascending"
786
  msgstr ""
787
 
788
- #: polls-options.php:241
789
- #: polls-options.php:266
790
  msgid "Descending"
791
  msgstr ""
792
 
793
- #: polls-options.php:248
794
  msgid "Sorting Of Poll Results"
795
  msgstr ""
796
 
797
- #: polls-options.php:251
798
  msgid "Sort Poll Results By:"
799
  msgstr ""
800
 
801
- #: polls-options.php:254
802
- msgid "Votes Casted"
803
  msgstr ""
804
 
805
- #: polls-options.php:262
806
  msgid "Sort Order Of Poll Results:"
807
  msgstr ""
808
 
809
- #: polls-options.php:273
810
  msgid "Allow To Vote"
811
  msgstr ""
812
 
813
- #: polls-options.php:276
814
  msgid "Who Is Allowed To Vote?"
815
  msgstr ""
816
 
817
- #: polls-options.php:279
818
  msgid "Guests Only"
819
  msgstr ""
820
 
821
- #: polls-options.php:280
822
  msgid "Registered Users Only"
823
  msgstr ""
824
 
825
- #: polls-options.php:281
826
  msgid "Registered Users And Guests"
827
  msgstr ""
828
 
829
- #: polls-options.php:291
830
  msgid "Poll Logging Method:"
831
  msgstr ""
832
 
833
- #: polls-options.php:294
834
  msgid "Do Not Log"
835
  msgstr ""
836
 
837
- #: polls-options.php:295
838
  msgid "Logged By Cookie"
839
  msgstr ""
840
 
841
- #: polls-options.php:296
842
  msgid "Logged By IP"
843
  msgstr ""
844
 
845
- #: polls-options.php:297
846
  msgid "Logged By Cookie And IP"
847
  msgstr ""
848
 
849
- #: polls-options.php:298
850
  msgid "Logged By Username"
851
  msgstr ""
852
 
853
- #: polls-options.php:303
854
  msgid "Expiry Time For Cookie And Log:"
855
  msgstr ""
856
 
857
- #: polls-options.php:304
858
  msgid "seconds (0 to disable)"
859
  msgstr ""
860
 
861
- #: polls-options.php:309
862
  msgid "Poll Archive"
863
  msgstr ""
864
 
865
- #: polls-options.php:312
866
  msgid "Number Of Polls Per Page:"
867
  msgstr ""
868
 
869
- #: polls-options.php:316
870
  msgid "Type Of Polls To Display In Poll Archive:"
871
  msgstr ""
872
 
873
- #: polls-options.php:319
874
  msgid "Closed Polls Only"
875
  msgstr ""
876
 
877
- #: polls-options.php:320
878
  msgid "Opened Polls Only"
879
  msgstr ""
880
 
881
- #: polls-options.php:321
882
  msgid "Closed And Opened Polls"
883
  msgstr ""
884
 
885
- #: polls-options.php:326
886
  msgid "Poll Archive URL:"
887
  msgstr ""
888
 
889
- #: polls-options.php:330
890
  msgid "Display Poll Archive Link Below Poll?"
891
  msgstr ""
892
 
893
- #: polls-options.php:339
894
- #: polls-options.php:377
895
  msgid "Note"
896
  msgstr ""
897
 
898
- #: polls-options.php:340
899
  msgid "Only polls' results will be shown in the Poll Archive regardless of whether the poll is closed or opened."
900
  msgstr ""
901
 
902
- #: polls-options.php:345
903
- #: polls-options.php:348
904
- #: wp-polls-widget.php:114
905
  msgid "Current Active Poll"
906
  msgstr ""
907
 
908
- #: polls-options.php:351
909
- #: wp-polls-widget.php:120
910
  msgid "Do NOT Display Poll (Disable)"
911
  msgstr ""
912
 
913
- #: polls-options.php:352
914
- #: wp-polls-widget.php:125
915
  msgid "Display Random Poll"
916
  msgstr ""
917
 
918
- #: polls-options.php:353
919
- #: wp-polls-widget.php:130
920
  msgid "Display Latest Poll"
921
  msgstr ""
922
 
923
- #: polls-options.php:355
924
- #: wp-polls-widget.php:135
925
- msgid "Display Multiple Polls"
926
- msgstr ""
927
-
928
- #: polls-options.php:378
929
  msgid "If you chose 'Display Multiple Polls' for the above option, you need to configure it in Presentation -> Widgets -> Poll."
930
  msgstr ""
931
 
932
- #: polls-options.php:382
933
  msgid "When Poll Is Closed"
934
  msgstr ""
935
 
936
- #: polls-options.php:385
937
  msgid "Display Poll's Results"
938
  msgstr ""
939
 
940
- #: polls-options.php:386
941
  msgid "Display Disabled Poll's Voting Form"
942
  msgstr ""
943
 
944
- #: polls-options.php:387
945
  msgid "Do Not Display Poll In Post/Sidebar"
946
  msgstr ""
947
 
948
- #: polls-options.php:395
949
  #: polls-templates.php:493
950
  msgid "Save Changes"
951
  msgstr ""
@@ -1012,67 +999,67 @@ msgstr ""
1012
 
1013
  #: polls-templates.php:110
1014
  #: polls-templates.php:125
1015
- #: wp-polls.php:1416
1016
- #: wp-polls.php:1429
1017
  msgid "Vote"
1018
  msgstr ""
1019
 
1020
  #: polls-templates.php:110
1021
- #: wp-polls.php:1417
1022
  msgid "View Results Of This Poll"
1023
  msgstr ""
1024
 
1025
  #: polls-templates.php:110
1026
- #: wp-polls.php:1417
1027
  msgid "View Results"
1028
  msgstr ""
1029
 
1030
  #: polls-templates.php:116
1031
  #: polls-templates.php:119
1032
- #: wp-polls.php:1422
1033
- #: wp-polls.php:1423
1034
  msgid ","
1035
  msgstr ""
1036
 
1037
  #: polls-templates.php:116
1038
  #: polls-templates.php:119
1039
- #: wp-polls.php:1422
1040
- #: wp-polls.php:1423
1041
  msgid "Votes"
1042
  msgstr ""
1043
 
1044
  #: polls-templates.php:119
1045
- #: wp-polls.php:1423
1046
  msgid "You Have Voted For This Choice"
1047
  msgstr ""
1048
 
1049
  #: polls-templates.php:125
1050
- #: wp-polls.php:1429
1051
  msgid "Vote For This Poll"
1052
  msgstr ""
1053
 
1054
  #: polls-templates.php:128
1055
- #: wp-polls.php:1456
1056
  msgid "Polls Archive"
1057
  msgstr ""
1058
 
1059
  #: polls-templates.php:134
1060
- #: wp-polls.php:1460
1061
  msgid "Start Date:"
1062
  msgstr ""
1063
 
1064
  #: polls-templates.php:134
1065
- #: wp-polls.php:1460
1066
  msgid "End Date:"
1067
  msgstr ""
1068
 
1069
  #: polls-templates.php:143
1070
- #: wp-polls.php:1431
1071
  msgid "Sorry, there are no polls available at the moment."
1072
  msgstr ""
1073
 
1074
  #: polls-templates.php:146
1075
- #: wp-polls.php:1432
1076
  msgid "An error has occurred when processing your poll."
1077
  msgstr ""
1078
 
@@ -1346,7 +1333,7 @@ msgstr ""
1346
 
1347
  #: polls-uninstall.php:59
1348
  #, php-format
1349
- msgid "Error deleting Setting Key '%s'."
1350
  msgstr ""
1351
 
1352
  #: polls-uninstall.php:82
@@ -1396,28 +1383,16 @@ msgid ""
1396
  " Choose [Cancel] To Stop, [OK] To Uninstall."
1397
  msgstr ""
1398
 
1399
- #: wp-polls-widget.php:96
1400
- msgid "Title"
1401
- msgstr ""
1402
-
1403
- #: wp-polls-widget.php:99
1404
- msgid "Display Polls Archive Link Below Poll?"
1405
- msgstr ""
1406
-
1407
- #: wp-polls-widget.php:159
1408
- msgid "Select Multiple Polls"
1409
- msgstr ""
1410
-
1411
- #: wp-polls.php:196
1412
  msgid "Your last request is still being processed. Please wait a while ..."
1413
  msgstr ""
1414
 
1415
- #: wp-polls.php:197
1416
  msgid "Please choose a valid poll answer."
1417
  msgstr ""
1418
 
1419
- #: wp-polls.php:198
1420
- msgid "Maximum number of choices allowed:"
1421
  msgstr ""
1422
 
1423
  #: wp-polls.php:246
@@ -1428,120 +1403,135 @@ msgstr ""
1428
  msgid "Please check the \\'Yes\\' checkbox if you want to delete all logs for this poll ONLY."
1429
  msgstr ""
1430
 
1431
- #: wp-polls.php:265
1432
  msgid "Enter Poll ID"
1433
  msgstr ""
1434
 
1435
- #: wp-polls.php:266
1436
  msgid "Error: Poll ID must be numeric"
1437
  msgstr ""
1438
 
1439
- #: wp-polls.php:266
1440
  msgid "Please enter Poll ID again"
1441
  msgstr ""
1442
 
1443
- #: wp-polls.php:283
1444
- #: wp-polls.php:289
1445
  msgid "Poll"
1446
  msgstr ""
1447
 
1448
- #: wp-polls.php:290
1449
- msgid "Insert Poll"
1450
  msgstr ""
1451
 
1452
- #: wp-polls.php:527
1453
- #: wp-polls.php:687
1454
  msgid "Loading"
1455
  msgstr ""
1456
 
1457
- #: wp-polls.php:733
1458
  msgid "Note: There is a poll embedded within this post, please visit the site to participate in this post's poll."
1459
  msgstr ""
1460
 
1461
- #: wp-polls.php:1083
1462
  #, php-format
1463
  msgid "Page %s of %s"
1464
  msgstr ""
1465
 
1466
- #: wp-polls.php:1085
1467
  msgid "&laquo; First"
1468
  msgstr ""
1469
 
1470
- #: wp-polls.php:1089
1471
  msgid "&laquo;"
1472
  msgstr ""
1473
 
1474
- #: wp-polls.php:1099
1475
  msgid "&raquo;"
1476
  msgstr ""
1477
 
1478
- #: wp-polls.php:1103
1479
  msgid "Last &raquo;"
1480
  msgstr ""
1481
 
1482
- #: wp-polls.php:1284
1483
  #, php-format
1484
  msgid "Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s"
1485
  msgstr ""
1486
 
1487
- #: wp-polls.php:1288
1488
  #, php-format
1489
  msgid "You Had Already Voted For This Poll. Poll ID #%s"
1490
  msgstr ""
1491
 
1492
- #: wp-polls.php:1292
1493
  #, php-format
1494
  msgid "Invalid Poll ID. Poll ID #%s"
1495
  msgstr ""
1496
 
1497
- #: wp-polls.php:1320
1498
- #: wp-polls.php:1322
1499
- #: wp-polls.php:1332
1500
  msgid "WP-Polls"
1501
  msgstr ""
1502
 
1503
- #: wp-polls.php:1334
1504
  #, php-format
1505
  msgid "<strong>%s</strong> poll was created."
1506
  msgid_plural "<strong>%s</strong> polls were created."
1507
  msgstr[0] ""
1508
  msgstr[1] ""
1509
 
1510
- #: wp-polls.php:1335
1511
  #, php-format
1512
  msgid "<strong>%s</strong> polls' answer was given."
1513
  msgid_plural "<strong>%s</strong> polls' answers were given."
1514
  msgstr[0] ""
1515
  msgstr[1] ""
1516
 
1517
- #: wp-polls.php:1336
1518
  #, php-format
1519
  msgid "<strong>%s</strong> vote was casted."
1520
  msgid_plural "<strong>%s</strong> votes were casted."
1521
  msgstr[0] ""
1522
  msgstr[1] ""
1523
 
1524
- #: wp-polls.php:1400
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1525
  msgid "How Is My Site?"
1526
  msgstr ""
1527
 
1528
- #: wp-polls.php:1403
1529
  msgid "Good"
1530
  msgstr ""
1531
 
1532
- #: wp-polls.php:1404
1533
  msgid "Excellent"
1534
  msgstr ""
1535
 
1536
- #: wp-polls.php:1405
1537
  msgid "Bad"
1538
  msgstr ""
1539
 
1540
- #: wp-polls.php:1406
1541
  msgid "Can Be Improved"
1542
  msgstr ""
1543
 
1544
- #: wp-polls.php:1407
1545
  msgid "No Comments"
1546
  msgstr ""
1547
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WP-Polls 2.50\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-06-17 21:50+0800\n"
6
+ "PO-Revision-Date: 2009-06-17 21:50+0800\n"
7
  "Last-Translator: Lester Chan <lesterchan@gmail.com>\n"
8
  "Language-Team: Lester Chan <lesterchan@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-Country: SINGAPORE\n"
13
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;__ngettext_noop:1,2\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-Language: English\n"
16
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
  #: polls-add.php:36
20
+ #: polls-add.php:111
21
+ #: polls-add.php:178
22
  #: wp-polls.php:64
23
+ #: wp-polls.php:309
24
  msgid "Add Poll"
25
  msgstr ""
26
 
41
  msgstr ""
42
 
43
  #: polls-add.php:96
44
+ #: polls-manager.php:334
45
  #: wp-polls.php:63
46
  msgid "Manage Polls"
47
  msgstr ""
48
 
49
+ #: polls-add.php:113
50
+ #: polls-manager.php:184
 
 
 
 
 
 
 
 
 
 
 
51
  msgid "Poll Question"
52
  msgstr ""
53
 
54
+ #: polls-add.php:116
55
+ #: polls-manager.php:187
56
+ #: polls-manager.php:341
57
  msgid "Question"
58
  msgstr ""
59
 
60
+ #: polls-add.php:121
61
+ #: polls-manager.php:192
62
  msgid "Poll Answers"
63
  msgstr ""
64
 
65
+ #: polls-add.php:126
66
+ #: polls-manager.php:227
67
  msgid "Add Answer"
68
  msgstr ""
69
 
70
+ #: polls-add.php:133
71
+ #: polls-manager.php:214
 
 
 
 
 
72
  #, php-format
73
  msgid "Answer %s"
74
  msgstr ""
75
 
76
+ #: polls-add.php:134
77
+ #: wp-polls.php:253
78
+ msgid "Remove"
79
+ msgstr ""
80
+
81
+ #: polls-add.php:142
82
+ #: polls-manager.php:238
83
  msgid "Poll Multiple Answers"
84
  msgstr ""
85
 
86
+ #: polls-add.php:145
87
+ #: polls-manager.php:241
88
  msgid "Allows Users To Select More Than One Answer?"
89
  msgstr ""
90
 
91
+ #: polls-add.php:148
92
+ #: polls-manager.php:244
93
+ #: polls-options.php:199
94
+ #: polls-options.php:208
95
+ #: polls-options.php:325
96
+ #: wp-polls.php:1415
97
  msgid "No"
98
  msgstr ""
99
 
100
+ #: polls-add.php:149
101
  #: polls-logs.php:373
102
+ #: polls-manager.php:245
103
+ #: polls-manager.php:470
104
+ #: polls-options.php:200
105
+ #: polls-options.php:209
106
+ #: polls-options.php:326
107
  #: polls-uninstall.php:134
108
+ #: wp-polls.php:1416
109
  msgid "Yes"
110
  msgstr ""
111
 
112
+ #: polls-add.php:154
113
+ #: polls-manager.php:250
114
  msgid "Maximum Number Of Selected Answers Allowed?"
115
  msgstr ""
116
 
117
+ #: polls-add.php:167
118
+ #: polls-manager.php:267
119
  msgid "Poll Start/End Date"
120
  msgstr ""
121
 
122
+ #: polls-add.php:170
123
+ #: polls-manager.php:270
124
+ #: polls-manager.php:343
125
  msgid "Start Date/Time"
126
  msgstr ""
127
 
128
+ #: polls-add.php:174
129
+ #: polls-manager.php:278
130
+ #: polls-manager.php:344
131
  msgid "End Date/Time"
132
  msgstr ""
133
 
134
+ #: polls-add.php:175
135
+ #: polls-manager.php:289
136
  msgid "Do NOT Expire This Poll"
137
  msgstr ""
138
 
139
+ #: polls-add.php:178
140
+ #: polls-manager.php:315
141
  msgid "Cancel"
142
  msgstr ""
143
 
144
  #: polls-admin-ajax.php:43
145
+ #: polls-manager.php:471
146
  #: wp-polls.php:245
147
  msgid "Delete All Logs"
148
  msgstr ""
187
  msgstr ""
188
 
189
  #: polls-admin-ajax.php:83
190
+ #: polls-manager.php:314
191
  #: wp-polls.php:250
192
  msgid "Open Poll"
193
  msgstr ""
203
  msgstr ""
204
 
205
  #: polls-admin-ajax.php:94
206
+ #: polls-manager.php:313
207
  #: wp-polls.php:251
208
  msgid "Close Poll"
209
  msgstr ""
240
  #: polls-logs.php:69
241
  #: polls-logs.php:102
242
  #: polls-logs.php:105
243
+ #: wp-polls.php:1274
244
  msgid "Guest"
245
  msgstr ""
246
 
365
  msgid "This default filter is limited to display only <strong>100</strong> records."
366
  msgstr ""
367
 
368
+ #: polls-logs.php:281
369
+ #: polls-logs.php:324
370
+ #: wp-polls.php:252
371
+ msgid "Answer"
372
+ msgstr ""
373
+
374
  #: polls-logs.php:282
375
  msgid "IP"
376
  msgstr ""
386
 
387
  #: polls-logs.php:291
388
  #: polls-logs.php:319
389
+ #: polls-manager.php:272
390
+ #: polls-manager.php:284
391
+ #: polls-manager.php:364
392
+ #: polls-manager.php:372
393
+ #: wp-polls.php:460
394
+ #: wp-polls.php:465
395
+ #: wp-polls.php:574
396
+ #: wp-polls.php:579
397
+ #: wp-polls.php:964
398
+ #: wp-polls.php:968
399
  #, php-format
400
  msgid "%s @ %s"
401
  msgstr ""
441
  msgstr ""
442
 
443
  #: polls-logs.php:381
444
+ #: polls-manager.php:478
445
  msgid "Note: If your logging method is by IP and Cookie or by Cookie, users may still be unable to vote if they have voted before as the cookie is still stored in their computer."
446
  msgstr ""
447
 
448
  #: polls-manager.php:39
449
+ #: polls-manager.php:182
450
+ #: polls-manager.php:303
451
  msgid "Edit Poll"
452
  msgstr ""
453
 
481
  msgid "Poll '%s' Edited Successfully."
482
  msgstr ""
483
 
484
+ #: polls-manager.php:196
 
 
 
 
485
  msgid "Answer No."
486
  msgstr ""
487
 
488
+ #: polls-manager.php:197
489
  msgid "Answer Text"
490
  msgstr ""
491
 
492
+ #: polls-manager.php:198
493
  msgid "No. Of Votes"
494
  msgstr ""
495
 
496
+ #: polls-manager.php:207
497
  msgid "Null Votes"
498
  msgstr ""
499
 
500
+ #: polls-manager.php:216
501
+ #: polls-manager.php:419
502
  msgid "Delete"
503
  msgstr ""
504
 
505
+ #: polls-manager.php:216
506
  #, php-format
507
  msgid "You are about to delete this poll's answer '%s'."
508
  msgstr ""
509
 
510
+ #: polls-manager.php:228
511
  msgid "Total Votes:"
512
  msgstr ""
513
 
514
+ #: polls-manager.php:233
515
+ #: polls-manager.php:453
516
  msgid "Total Voters:"
517
  msgstr ""
518
 
519
+ #: polls-manager.php:273
520
  msgid "Edit Start Date/Time"
521
  msgstr ""
522
 
523
+ #: polls-manager.php:282
524
  msgid "This Poll Will Not Expire"
525
  msgstr ""
526
 
527
+ #: polls-manager.php:313
528
  #, php-format
529
  msgid "You are about to CLOSE this poll '%s'."
530
  msgstr ""
531
 
532
+ #: polls-manager.php:314
533
  #, php-format
534
  msgid "You are about to OPEN this poll '%s'."
535
  msgstr ""
536
 
537
+ #: polls-manager.php:335
 
538
  #: wp-polls.php:60
539
+ #: wp-polls.php:1369
540
+ #: wp-polls.php:1404
541
  msgid "Polls"
542
  msgstr ""
543
 
544
+ #: polls-manager.php:340
545
  msgid "ID"
546
  msgstr ""
547
 
548
+ #: polls-manager.php:342
549
  #: polls-templates.php:122
550
  #: polls-templates.php:125
551
+ #: wp-polls.php:1539
552
+ #: wp-polls.php:1542
553
  msgid "Total Voters"
554
  msgstr ""
555
 
556
+ #: polls-manager.php:345
557
  msgid "Status"
558
  msgstr ""
559
 
560
+ #: polls-manager.php:346
561
  msgid "Action"
562
  msgstr ""
563
 
564
+ #: polls-manager.php:370
565
+ #: wp-polls.php:463
566
+ #: wp-polls.php:577
567
+ #: wp-polls.php:966
568
  msgid "No Expiry"
569
  msgstr ""
570
 
571
+ #: polls-manager.php:395
572
+ #: polls-manager.php:399
573
+ #: polls-manager.php:402
574
  msgid "Displayed:"
575
  msgstr ""
576
 
577
+ #: polls-manager.php:410
578
  msgid "Open"
579
  msgstr ""
580
 
581
+ #: polls-manager.php:412
582
  msgid "Future"
583
  msgstr ""
584
 
585
+ #: polls-manager.php:414
586
  msgid "Closed"
587
  msgstr ""
588
 
589
+ #: polls-manager.php:417
590
  msgid "Logs"
591
  msgstr ""
592
 
593
+ #: polls-manager.php:418
594
  msgid "Edit"
595
  msgstr ""
596
 
597
+ #: polls-manager.php:419
598
  #, php-format
599
  msgid "You are about to delete this poll, '%s'."
600
  msgstr ""
601
 
602
+ #: polls-manager.php:427
603
  msgid "No Polls Found"
604
  msgstr ""
605
 
606
+ #: polls-manager.php:437
607
  msgid "Polls Stats:"
608
  msgstr ""
609
 
610
+ #: polls-manager.php:441
611
  msgid "Total Polls:"
612
  msgstr ""
613
 
614
+ #: polls-manager.php:445
615
  msgid "Total Polls' Answers:"
616
  msgstr ""
617
 
618
+ #: polls-manager.php:449
619
  msgid "Total Votes Casted:"
620
  msgstr ""
621
 
622
+ #: polls-manager.php:462
623
  msgid "Polls Logs"
624
  msgstr ""
625
 
626
+ #: polls-manager.php:469
627
  msgid "Are You Sure You Want To Delete All Polls Logs?"
628
  msgstr ""
629
 
630
+ #: polls-manager.php:471
631
  msgid "You are about to delete all poll logs. This action is not reversible."
632
  msgstr ""
633
 
634
+ #: polls-manager.php:474
635
  #: wp-polls.php:244
636
  msgid "No poll logs available."
637
  msgstr ""
638
 
639
  #: polls-options.php:70
640
+ #: polls-options.php:130
641
+ #: polls-options.php:133
642
  msgid "Poll Bar Style"
643
  msgstr ""
644
 
687
  msgstr ""
688
 
689
  #: polls-options.php:82
690
+ #: polls-options.php:280
691
  msgid "Logging Method"
692
  msgstr ""
693
 
709
  msgid "No Poll Option Updated"
710
  msgstr ""
711
 
712
+ #: polls-options.php:128
713
  #: wp-polls.php:65
714
  msgid "Poll Options"
715
  msgstr ""
716
 
717
+ #: polls-options.php:160
718
  msgid "Use CSS Style"
719
  msgstr ""
720
 
721
+ #: polls-options.php:164
722
  msgid "Poll Bar Background"
723
  msgstr ""
724
 
725
+ #: polls-options.php:169
726
  msgid "Poll Bar Border"
727
  msgstr ""
728
 
729
+ #: polls-options.php:174
730
  msgid "Poll Bar Height"
731
  msgstr ""
732
 
733
+ #: polls-options.php:178
734
  msgid "Your poll bar will look like this"
735
  msgstr ""
736
 
737
+ #: polls-options.php:193
738
  msgid "Polls AJAX Style"
739
  msgstr ""
740
 
741
+ #: polls-options.php:196
742
  msgid "Show Loading Image With Text"
743
  msgstr ""
744
 
745
+ #: polls-options.php:205
746
  msgid "Show Fading In And Fading Out Of Poll"
747
  msgstr ""
748
 
749
+ #: polls-options.php:216
750
  msgid "Sorting Of Poll Answers"
751
  msgstr ""
752
 
753
+ #: polls-options.php:219
754
  msgid "Sort Poll Answers By:"
755
  msgstr ""
756
 
757
+ #: polls-options.php:222
758
+ #: polls-options.php:247
759
  msgid "Exact Order"
760
  msgstr ""
761
 
762
+ #: polls-options.php:223
763
+ #: polls-options.php:248
764
  msgid "Alphabetical Order"
765
  msgstr ""
766
 
767
+ #: polls-options.php:224
768
+ #: polls-options.php:249
769
  msgid "Random Order"
770
  msgstr ""
771
 
772
+ #: polls-options.php:229
773
  msgid "Sort Order Of Poll Answers:"
774
  msgstr ""
775
 
776
+ #: polls-options.php:232
777
+ #: polls-options.php:257
778
  msgid "Ascending"
779
  msgstr ""
780
 
781
+ #: polls-options.php:233
782
+ #: polls-options.php:258
783
  msgid "Descending"
784
  msgstr ""
785
 
786
+ #: polls-options.php:240
787
  msgid "Sorting Of Poll Results"
788
  msgstr ""
789
 
790
+ #: polls-options.php:243
791
  msgid "Sort Poll Results By:"
792
  msgstr ""
793
 
794
+ #: polls-options.php:246
795
+ msgid "Votes Cast"
796
  msgstr ""
797
 
798
+ #: polls-options.php:254
799
  msgid "Sort Order Of Poll Results:"
800
  msgstr ""
801
 
802
+ #: polls-options.php:265
803
  msgid "Allow To Vote"
804
  msgstr ""
805
 
806
+ #: polls-options.php:268
807
  msgid "Who Is Allowed To Vote?"
808
  msgstr ""
809
 
810
+ #: polls-options.php:271
811
  msgid "Guests Only"
812
  msgstr ""
813
 
814
+ #: polls-options.php:272
815
  msgid "Registered Users Only"
816
  msgstr ""
817
 
818
+ #: polls-options.php:273
819
  msgid "Registered Users And Guests"
820
  msgstr ""
821
 
822
+ #: polls-options.php:283
823
  msgid "Poll Logging Method:"
824
  msgstr ""
825
 
826
+ #: polls-options.php:286
827
  msgid "Do Not Log"
828
  msgstr ""
829
 
830
+ #: polls-options.php:287
831
  msgid "Logged By Cookie"
832
  msgstr ""
833
 
834
+ #: polls-options.php:288
835
  msgid "Logged By IP"
836
  msgstr ""
837
 
838
+ #: polls-options.php:289
839
  msgid "Logged By Cookie And IP"
840
  msgstr ""
841
 
842
+ #: polls-options.php:290
843
  msgid "Logged By Username"
844
  msgstr ""
845
 
846
+ #: polls-options.php:295
847
  msgid "Expiry Time For Cookie And Log:"
848
  msgstr ""
849
 
850
+ #: polls-options.php:296
851
  msgid "seconds (0 to disable)"
852
  msgstr ""
853
 
854
+ #: polls-options.php:301
855
  msgid "Poll Archive"
856
  msgstr ""
857
 
858
+ #: polls-options.php:304
859
  msgid "Number Of Polls Per Page:"
860
  msgstr ""
861
 
862
+ #: polls-options.php:308
863
  msgid "Type Of Polls To Display In Poll Archive:"
864
  msgstr ""
865
 
866
+ #: polls-options.php:311
867
  msgid "Closed Polls Only"
868
  msgstr ""
869
 
870
+ #: polls-options.php:312
871
  msgid "Opened Polls Only"
872
  msgstr ""
873
 
874
+ #: polls-options.php:313
875
  msgid "Closed And Opened Polls"
876
  msgstr ""
877
 
878
+ #: polls-options.php:318
879
  msgid "Poll Archive URL:"
880
  msgstr ""
881
 
882
+ #: polls-options.php:322
883
  msgid "Display Poll Archive Link Below Poll?"
884
  msgstr ""
885
 
886
+ #: polls-options.php:331
887
+ #: polls-options.php:366
888
  msgid "Note"
889
  msgstr ""
890
 
891
+ #: polls-options.php:332
892
  msgid "Only polls' results will be shown in the Poll Archive regardless of whether the poll is closed or opened."
893
  msgstr ""
894
 
895
+ #: polls-options.php:337
896
+ #: polls-options.php:340
 
897
  msgid "Current Active Poll"
898
  msgstr ""
899
 
900
+ #: polls-options.php:343
901
+ #: wp-polls.php:1423
902
  msgid "Do NOT Display Poll (Disable)"
903
  msgstr ""
904
 
905
+ #: polls-options.php:344
906
+ #: wp-polls.php:1424
907
  msgid "Display Random Poll"
908
  msgstr ""
909
 
910
+ #: polls-options.php:345
911
+ #: wp-polls.php:1425
912
  msgid "Display Latest Poll"
913
  msgstr ""
914
 
915
+ #: polls-options.php:367
 
 
 
 
 
916
  msgid "If you chose 'Display Multiple Polls' for the above option, you need to configure it in Presentation -> Widgets -> Poll."
917
  msgstr ""
918
 
919
+ #: polls-options.php:371
920
  msgid "When Poll Is Closed"
921
  msgstr ""
922
 
923
+ #: polls-options.php:374
924
  msgid "Display Poll's Results"
925
  msgstr ""
926
 
927
+ #: polls-options.php:375
928
  msgid "Display Disabled Poll's Voting Form"
929
  msgstr ""
930
 
931
+ #: polls-options.php:376
932
  msgid "Do Not Display Poll In Post/Sidebar"
933
  msgstr ""
934
 
935
+ #: polls-options.php:384
936
  #: polls-templates.php:493
937
  msgid "Save Changes"
938
  msgstr ""
999
 
1000
  #: polls-templates.php:110
1001
  #: polls-templates.php:125
1002
+ #: wp-polls.php:1530
1003
+ #: wp-polls.php:1543
1004
  msgid "Vote"
1005
  msgstr ""
1006
 
1007
  #: polls-templates.php:110
1008
+ #: wp-polls.php:1531
1009
  msgid "View Results Of This Poll"
1010
  msgstr ""
1011
 
1012
  #: polls-templates.php:110
1013
+ #: wp-polls.php:1531
1014
  msgid "View Results"
1015
  msgstr ""
1016
 
1017
  #: polls-templates.php:116
1018
  #: polls-templates.php:119
1019
+ #: wp-polls.php:1536
1020
+ #: wp-polls.php:1537
1021
  msgid ","
1022
  msgstr ""
1023
 
1024
  #: polls-templates.php:116
1025
  #: polls-templates.php:119
1026
+ #: wp-polls.php:1536
1027
+ #: wp-polls.php:1537
1028
  msgid "Votes"
1029
  msgstr ""
1030
 
1031
  #: polls-templates.php:119
1032
+ #: wp-polls.php:1537
1033
  msgid "You Have Voted For This Choice"
1034
  msgstr ""
1035
 
1036
  #: polls-templates.php:125
1037
+ #: wp-polls.php:1543
1038
  msgid "Vote For This Poll"
1039
  msgstr ""
1040
 
1041
  #: polls-templates.php:128
1042
+ #: wp-polls.php:1569
1043
  msgid "Polls Archive"
1044
  msgstr ""
1045
 
1046
  #: polls-templates.php:134
1047
+ #: wp-polls.php:1573
1048
  msgid "Start Date:"
1049
  msgstr ""
1050
 
1051
  #: polls-templates.php:134
1052
+ #: wp-polls.php:1573
1053
  msgid "End Date:"
1054
  msgstr ""
1055
 
1056
  #: polls-templates.php:143
1057
+ #: wp-polls.php:1545
1058
  msgid "Sorry, there are no polls available at the moment."
1059
  msgstr ""
1060
 
1061
  #: polls-templates.php:146
1062
+ #: wp-polls.php:1546
1063
  msgid "An error has occurred when processing your poll."
1064
  msgstr ""
1065
 
1333
 
1334
  #: polls-uninstall.php:59
1335
  #, php-format
1336
+ msgid "Error deleting Setting Key '%s' or Setting Key '%s' does not exist."
1337
  msgstr ""
1338
 
1339
  #: polls-uninstall.php:82
1383
  " Choose [Cancel] To Stop, [OK] To Uninstall."
1384
  msgstr ""
1385
 
1386
+ #: wp-polls.php:223
 
 
 
 
 
 
 
 
 
 
 
 
1387
  msgid "Your last request is still being processed. Please wait a while ..."
1388
  msgstr ""
1389
 
1390
+ #: wp-polls.php:224
1391
  msgid "Please choose a valid poll answer."
1392
  msgstr ""
1393
 
1394
+ #: wp-polls.php:225
1395
+ msgid "Maximum number of choices allowed: "
1396
  msgstr ""
1397
 
1398
  #: wp-polls.php:246
1403
  msgid "Please check the \\'Yes\\' checkbox if you want to delete all logs for this poll ONLY."
1404
  msgstr ""
1405
 
1406
+ #: wp-polls.php:269
1407
  msgid "Enter Poll ID"
1408
  msgstr ""
1409
 
1410
+ #: wp-polls.php:270
1411
  msgid "Error: Poll ID must be numeric"
1412
  msgstr ""
1413
 
1414
+ #: wp-polls.php:270
1415
  msgid "Please enter Poll ID again"
1416
  msgstr ""
1417
 
1418
+ #: wp-polls.php:271
 
1419
  msgid "Poll"
1420
  msgstr ""
1421
 
1422
+ #: wp-polls.php:272
1423
+ msgid "Insert_Poll"
1424
  msgstr ""
1425
 
1426
+ #: wp-polls.php:539
1427
+ #: wp-polls.php:707
1428
  msgid "Loading"
1429
  msgstr ""
1430
 
1431
+ #: wp-polls.php:753
1432
  msgid "Note: There is a poll embedded within this post, please visit the site to participate in this post's poll."
1433
  msgstr ""
1434
 
1435
+ #: wp-polls.php:1099
1436
  #, php-format
1437
  msgid "Page %s of %s"
1438
  msgstr ""
1439
 
1440
+ #: wp-polls.php:1101
1441
  msgid "&laquo; First"
1442
  msgstr ""
1443
 
1444
+ #: wp-polls.php:1105
1445
  msgid "&laquo;"
1446
  msgstr ""
1447
 
1448
+ #: wp-polls.php:1115
1449
  msgid "&raquo;"
1450
  msgstr ""
1451
 
1452
+ #: wp-polls.php:1119
1453
  msgid "Last &raquo;"
1454
  msgstr ""
1455
 
1456
+ #: wp-polls.php:1305
1457
  #, php-format
1458
  msgid "Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s"
1459
  msgstr ""
1460
 
1461
+ #: wp-polls.php:1309
1462
  #, php-format
1463
  msgid "You Had Already Voted For This Poll. Poll ID #%s"
1464
  msgstr ""
1465
 
1466
+ #: wp-polls.php:1313
1467
  #, php-format
1468
  msgid "Invalid Poll ID. Poll ID #%s"
1469
  msgstr ""
1470
 
1471
+ #: wp-polls.php:1341
1472
+ #: wp-polls.php:1343
1473
+ #: wp-polls.php:1353
1474
  msgid "WP-Polls"
1475
  msgstr ""
1476
 
1477
+ #: wp-polls.php:1355
1478
  #, php-format
1479
  msgid "<strong>%s</strong> poll was created."
1480
  msgid_plural "<strong>%s</strong> polls were created."
1481
  msgstr[0] ""
1482
  msgstr[1] ""
1483
 
1484
+ #: wp-polls.php:1356
1485
  #, php-format
1486
  msgid "<strong>%s</strong> polls' answer was given."
1487
  msgid_plural "<strong>%s</strong> polls' answers were given."
1488
  msgstr[0] ""
1489
  msgstr[1] ""
1490
 
1491
+ #: wp-polls.php:1357
1492
  #, php-format
1493
  msgid "<strong>%s</strong> vote was casted."
1494
  msgid_plural "<strong>%s</strong> votes were casted."
1495
  msgstr[0] ""
1496
  msgstr[1] ""
1497
 
1498
+ #: wp-polls.php:1368
1499
+ msgid "WP-Polls polls"
1500
+ msgstr ""
1501
+
1502
+ #: wp-polls.php:1410
1503
+ msgid "Title:"
1504
+ msgstr ""
1505
+
1506
+ #: wp-polls.php:1413
1507
+ msgid "Display Polls Archive Link Below Poll?"
1508
+ msgstr ""
1509
+
1510
+ #: wp-polls.php:1421
1511
+ msgid "Poll To Display:"
1512
+ msgstr ""
1513
+
1514
+ #: wp-polls.php:1514
1515
  msgid "How Is My Site?"
1516
  msgstr ""
1517
 
1518
+ #: wp-polls.php:1517
1519
  msgid "Good"
1520
  msgstr ""
1521
 
1522
+ #: wp-polls.php:1518
1523
  msgid "Excellent"
1524
  msgstr ""
1525
 
1526
+ #: wp-polls.php:1519
1527
  msgid "Bad"
1528
  msgstr ""
1529
 
1530
+ #: wp-polls.php:1520
1531
  msgid "Can Be Improved"
1532
  msgstr ""
1533
 
1534
+ #: wp-polls.php:1521
1535
  msgid "No Comments"
1536
  msgstr ""
1537