WP-Polls - Version 2.30

Version Description

Download this release

Release Info

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

Code changes from version 2.21 to 2.30

{polls/images → images}/default/pollbg.gif RENAMED
File without changes
{polls/images → images}/default_gradient/pollbg.gif RENAMED
File without changes
{polls/images → images}/loading.gif RENAMED
File without changes
polls/polls-add.php → polls-add.php RENAMED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.1 Plugin: WP-Polls 2.21 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -11,7 +11,7 @@
11
  | |
12
  | File Information: |
13
  | - Add Poll |
14
- | - wp-content/plugins/polls/polls-add.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
@@ -24,7 +24,7 @@ if(!current_user_can('manage_polls')) {
24
 
25
 
26
  ### Poll Manager
27
- $base_name = plugin_basename('polls/polls-manager.php');
28
  $base_page = 'admin.php?page='.$base_name;
29
 
30
 
@@ -93,7 +93,7 @@ if(!empty($_POST['do'])) {
93
  $latest_pollid = polls_latest_id();
94
  $update_latestpoll = update_option('poll_latestpoll', $latest_pollid);
95
  if(empty($text)) {
96
- $text = '<p style="color: green;">'.sprintf(__('Poll \'%s\' Added Successfully.', 'wp-polls'), stripslashes($pollq_question)).' <a href="'.$base_page.'">Manage Polls &raquo;</a></p>';
97
  }
98
  cron_polls_place();
99
  break;
@@ -118,10 +118,10 @@ $count = 0;
118
  function create_poll_answer() {
119
  // Create Elements
120
  var poll_tr = document.createElement("tr");
121
- var poll_td1 = document.createElement("td");
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));
@@ -134,9 +134,9 @@ $count = 0;
134
  poll_option.setAttribute('value', count_poll_answer);
135
  poll_option.setAttribute('id', "pollq-multiple-" + (count_poll_answer+1));
136
  // Elements - TD/TR
137
- if(count_poll_answer%2 != 0) { poll_tr.style.background = "#eee"; }
138
  poll_tr.setAttribute('id', "poll-answer-" + count_poll_answer);
139
  poll_td1.setAttribute('width', "20%");
 
140
  poll_td2.setAttribute('width', "80%");
141
  // Appending
142
  poll_tr.appendChild(poll_td1);
@@ -174,15 +174,15 @@ $count = 0;
174
  <h2><?php _e('Add Poll', 'wp-polls'); ?></h2>
175
  <!-- Poll Question -->
176
  <h3><?php _e('Poll Question', 'wp-polls'); ?></h3>
177
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
178
- <tr style="background-color: #eee;">
179
- <td width="20%"><strong><?php _e('Question:', 'wp-polls') ?></strong></td>
180
  <td width="80%"><input type="text" size="70" name="pollq_question" value="" /></td>
181
  </tr>
182
  </table>
183
  <!-- Poll Answers -->
184
  <h3><?php _e('Poll Answers', 'wp-polls'); ?></h3>
185
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
186
  <tfoot>
187
  <tr>
188
  <td width="20%">&nbsp;</td>
@@ -192,13 +192,8 @@ $count = 0;
192
  <tbody id="poll_answers">
193
  <?php
194
  for($i = 1; $i <= $poll_noquestion; $i++) {
195
- if($i%2 == 0) {
196
- $style = 'style=\'background: none;\'';
197
- } else {
198
- $style = 'style=\'background-color: #eee;\'';
199
- }
200
- echo "<tr id=\"poll-answer-$i\" $style>\n";
201
- echo "<td width=\"20%\"><strong>".sprintf(__('Answer %s:', 'wp-polls'), $i)."</strong></td>\n";
202
  echo "<td width=\"80%\"><input type=\"text\" size=\"50\" name=\"polla_answers[]\" /></td>\n";
203
  echo "</tr>\n";
204
  $count++;
@@ -208,9 +203,9 @@ $count = 0;
208
  </table>
209
  <!-- Poll Multiple Answers -->
210
  <h3><?php _e('Poll Multiple Answers', 'wp-polls') ?></h3>
211
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
212
- <tr style="background-color: #eee;">
213
- <td width="40%" valign="top"><strong><?php _e('Allows Users To Select More Than One Answer?', 'wp-polls'); ?></strong></td>
214
  <td width="60%">
215
  <select name="pollq_multiple_yes" id="pollq_multiple_yes" size="1" onchange="check_pollq_multiple();">
216
  <option value="0"><?php _e('No', 'wp-polls'); ?></option>
@@ -219,7 +214,7 @@ $count = 0;
219
  </td>
220
  </tr>
221
  <tr>
222
- <td width="40%" valign="top"><strong><?php _e('Maximum Number Of Selected Answers Allowed?', 'wp-polls') ?></strong></td>
223
  <td width="60%">
224
  <select name="pollq_multiple" id="pollq_multiple" size="1" disabled="disabled">
225
  <?php
@@ -233,13 +228,13 @@ $count = 0;
233
  </table>
234
  <!-- Poll Start/End Date -->
235
  <h3><?php _e('Poll Start/End Date', 'wp-polls'); ?></h3>
236
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
237
- <tr style="background-color: #eee;">
238
- <td width="20%"><strong><?php _e('Start Date/Time:', 'wp-polls') ?></strong></td>
239
  <td width="80%"><?php poll_timestamp(current_time('timestamp')); ?></td>
240
  </tr>
241
  <tr>
242
- <td width="20%" valign="top"><strong><?php _e('End Date/Time:', 'wp-polls') ?></strong></td>
243
  <td width="80%"><input type="checkbox" name="pollq_expiry_no" id="pollq_expiry_no" value="1" checked="checked" onclick="check_pollexpiry();" />&nbsp;&nbsp;<label for="pollq_expiry_no"><?php _e('Do NOT Expire This Poll', 'wp-polls'); ?></label><?php poll_timestamp(current_time('timestamp'), 'pollq_expiry', 'none'); ?></td>
244
  </tr>
245
  </table>
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.5 Plugin: WP-Polls 2.30 |
6
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
11
  | |
12
  | File Information: |
13
  | - Add Poll |
14
+ | - wp-content/plugins/wp-polls/polls-add.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
24
 
25
 
26
  ### Poll Manager
27
+ $base_name = plugin_basename('wp-polls/polls-manager.php');
28
  $base_page = 'admin.php?page='.$base_name;
29
 
30
 
93
  $latest_pollid = polls_latest_id();
94
  $update_latestpoll = update_option('poll_latestpoll', $latest_pollid);
95
  if(empty($text)) {
96
+ $text = '<p style="color: green;">'.sprintf(__('Poll \'%s\' Added Successfully.', 'wp-polls'), stripslashes($pollq_question)).' <a href="'.$base_page.'">'.__('Manage Polls', 'wp-polls').'</a></p>';
97
  }
98
  cron_polls_place();
99
  break;
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));
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);
174
  <h2><?php _e('Add Poll', 'wp-polls'); ?></h2>
175
  <!-- Poll Question -->
176
  <h3><?php _e('Poll Question', 'wp-polls'); ?></h3>
177
+ <table class="form-table">
178
+ <tr>
179
+ <th width="20%" scope="row" valign="top"><?php _e('Question', 'wp-polls') ?></th>
180
  <td width="80%"><input type="text" size="70" name="pollq_question" value="" /></td>
181
  </tr>
182
  </table>
183
  <!-- Poll Answers -->
184
  <h3><?php _e('Poll Answers', 'wp-polls'); ?></h3>
185
+ <table class="form-table">
186
  <tfoot>
187
  <tr>
188
  <td width="20%">&nbsp;</td>
192
  <tbody id="poll_answers">
193
  <?php
194
  for($i = 1; $i <= $poll_noquestion; $i++) {
195
+ echo "<tr id=\"poll-answer-$i\">\n";
196
+ echo "<th width=\"20%\" scope=\"row\" valign=\"top\">".sprintf(__('Answer %s', 'wp-polls'), $i)."</th>\n";
 
 
 
 
 
197
  echo "<td width=\"80%\"><input type=\"text\" size=\"50\" name=\"polla_answers[]\" /></td>\n";
198
  echo "</tr>\n";
199
  $count++;
203
  </table>
204
  <!-- Poll Multiple Answers -->
205
  <h3><?php _e('Poll Multiple Answers', 'wp-polls') ?></h3>
206
+ <table class="form-table">
207
+ <tr>
208
+ <th width="40%" scope="row" valign="top"><?php _e('Allows Users To Select More Than One Answer?', 'wp-polls'); ?></th>
209
  <td width="60%">
210
  <select name="pollq_multiple_yes" id="pollq_multiple_yes" size="1" onchange="check_pollq_multiple();">
211
  <option value="0"><?php _e('No', 'wp-polls'); ?></option>
214
  </td>
215
  </tr>
216
  <tr>
217
+ <th width="40%" scope="row" valign="top"><?php _e('Maximum Number Of Selected Answers Allowed?', 'wp-polls') ?></th>
218
  <td width="60%">
219
  <select name="pollq_multiple" id="pollq_multiple" size="1" disabled="disabled">
220
  <?php
228
  </table>
229
  <!-- Poll Start/End Date -->
230
  <h3><?php _e('Poll Start/End Date', 'wp-polls'); ?></h3>
231
+ <table class="form-table">
232
+ <tr>
233
+ <th width="20%" scope="row" valign="top"><?php _e('Start Date/Time', 'wp-polls') ?></th>
234
  <td width="80%"><?php poll_timestamp(current_time('timestamp')); ?></td>
235
  </tr>
236
  <tr>
237
+ <th width="20%" scope="row" valign="top"><?php _e('End Date/Time', 'wp-polls') ?></th>
238
  <td width="80%"><input type="checkbox" name="pollq_expiry_no" id="pollq_expiry_no" value="1" checked="checked" onclick="check_pollexpiry();" />&nbsp;&nbsp;<label for="pollq_expiry_no"><?php _e('Do NOT Expire This Poll', 'wp-polls'); ?></label><?php poll_timestamp(current_time('timestamp'), 'pollq_expiry', 'none'); ?></td>
239
  </tr>
240
  </table>
polls/polls-admin-ajax.php → polls-admin-ajax.php RENAMED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.1 Plugin: WP-Polls 2.21 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -11,7 +11,7 @@
11
  | |
12
  | File Information: |
13
  | - Polls AJAX For Admin Backend |
14
- | - wp-content/plugins/polls/polls-admin-ajax.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.5 Plugin: WP-Polls 2.30 |
6
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
11
  | |
12
  | File Information: |
13
  | - Polls AJAX For Admin Backend |
14
+ | - wp-content/plugins/wp-polls/polls-admin-ajax.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
polls-admin-js-packed.js ADDED
@@ -0,0 +1 @@
 
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}('o 1=14 15(16);o e=0;o r=0;o y=0;4 C(){2.3(\'6\').7.8="f";D("E()",F)}4 E(){2.3("17").G(2.3("s-"+e))}4 18(a,b){H=g(b);9(H){e=a;1.h();1.5("i",19);1.5("p",a);1.j=\'k\';1.l=\'6\';1.m=C;1.n()}}4 I(){2.3(\'6\').7.8="f";2.3("J").t=K}4 1a(a){u=g(a);9(u){9(2.3("v").L==M){1.h();1.5("i",1b);1.5("v","N");1.j=\'k\';1.l=\'6\';1.m=I;1.n()}z{O(1c)}}}4 P(){2.3(\'6\').7.8="f";2.3("J").t=K;2.3("1d").7.8=\'A\';2.3("1e").7.8=\'f\'}4 1f(a,b){u=g(b);9(u){9(2.3("v").L==M){e=a;1.h();1.5("i",1g);1.5("v","N");1.5("p",a);1.j=\'k\';1.l=\'6\';1.m=P;1.n()}z{O(1h)}}}4 Q(){2.3(\'6\').7.8="f";D("R()",F);2.3(\'w\').t=(q(2.3(\'w\').t)-q(y));w=q(2.3(\'S\').B);T=q(2.3("1i-"+r).B);x=(w-T);9(x<0){x=0}2.3(\'S\').B=q(x)}4 R(){2.3("1j").G(2.3("s-1k-"+r))}4 1l(a,b,c,d){U=g(d);9(U){e=a;r=b;y=c;1.h();1.5("i",1m);1.5("p",a);1.5("1n",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="A";2.3("X").7.8="Y"}4 1o(a,b){Z=g(b);9(Z){e=a;1.h();1.5("i",1p);1.5("p",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="A"}4 1q(a,b){11=g(b);9(11){e=a;1.h();1.5("i",1r);1.5("p",a);1.j=\'k\';1.l=\'6\';1.m=10;1.n()}}4 1s(a,b){o c=12(1t);1u(1v(c)){c=12(1w)}9(c>0){9(a==\'1x\'){1y(b,\'[s 13="\'+c+\'"]\')}z{1z\'[s 13="\'+c+\'"]\'}}}',62,98,'|polls_admin|document|getElementById|function|setVar|message|style|display|if|||||global_poll_id|block|confirm|reset|do|method|POST|element|onCompletion|runAJAX|var|pollq_id|parseInt|global_poll_aid|poll|innerHTML|delete_poll_logs_confirm|delete_logs_yes|poll_total_votes|poll_total_votes_new|global_poll_aid_votes|else|none|value|delete_poll_message|setTimeout|remove_poll|1000|removeChild|delete_poll_confirm|delete_poll_logs_message|poll_logs|polls_admin_text_no_poll_logs|checked|true|yes|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|prompt|id|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|insertPoll|polls_admin_text_enter_poll_id|while|isNaN|polls_admin_text_enter_poll_id_again|code|edInsertContent|return'.split('|'),0,{}))
polls/polls-admin-js.php → polls-admin-js.js RENAMED
@@ -1,9 +1,8 @@
1
- <?php
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.1 Plugin: WP-Polls 2.21 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -11,24 +10,12 @@
11
  | |
12
  | File Information: |
13
  | - Polls Admin Javascript File |
14
- | - wp-content/plugins/polls/polls-admin-js.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
18
 
19
 
20
- ### Include wp-config.php
21
- @require('../../../wp-config.php');
22
- cache_javascript_headers();
23
-
24
- ### Determine polls-admin-ajax.php Path
25
- $polls_admin_ajax_url = dirname($_SERVER['PHP_SELF']);
26
- if(substr($polls_admin_ajax_url, -1) == '/') {
27
- $polls_admin_ajax_url = substr($polls_admin_ajax_url, 0, -1);
28
- }
29
- ?>
30
- // Variables
31
- var polls_admin_ajax_url = "<?php echo $polls_admin_ajax_url; ?>/polls-admin-ajax.php";
32
  var polls_admin = new sack(polls_admin_ajax_url);
33
  var global_poll_id = 0;
34
  var global_poll_aid = 0;
@@ -37,8 +24,6 @@ var global_poll_aid_votes = 0;
37
  // Function: Delete Poll Message
38
  function delete_poll_message() {
39
  document.getElementById('message').style.display = "block";
40
- Fat.fade_element("message", null, 3000, "#FFFF00");
41
- Fat.fade_element("poll-" + global_poll_id, null, 1000, "#FF3333");
42
  setTimeout("remove_poll()", 1000);
43
  }
44
 
@@ -53,7 +38,7 @@ function delete_poll(poll_id, poll_confirm) {
53
  if(delete_poll_confirm) {
54
  global_poll_id = poll_id;
55
  polls_admin.reset();
56
- polls_admin.setVar("do", "<?php _e('Delete Poll', 'wp-polls'); ?>");
57
  polls_admin.setVar("pollq_id", poll_id);
58
  polls_admin.method = 'POST';
59
  polls_admin.element = 'message';
@@ -65,8 +50,7 @@ function delete_poll(poll_id, poll_confirm) {
65
  // Function: Delete Poll Logs Message
66
  function delete_poll_logs_message() {
67
  document.getElementById('message').style.display = "block";
68
- Fat.fade_element("message", null, 3000, "#FFFF00");
69
- document.getElementById("poll_logs").innerHTML = "<?php _e('No poll logs available.', 'wp-polls'); ?>";
70
  }
71
 
72
  // Function: Delete Poll Logs
@@ -75,14 +59,14 @@ function delete_poll_logs(poll_confirm) {
75
  if(delete_poll_logs_confirm) {
76
  if(document.getElementById("delete_logs_yes").checked == true) {
77
  polls_admin.reset();
78
- polls_admin.setVar("do", "<?php _e('Delete All Logs', 'wp-polls'); ?>");
79
  polls_admin.setVar("delete_logs_yes", "yes");
80
  polls_admin.method = 'POST';
81
  polls_admin.element = 'message';
82
  polls_admin.onCompletion = delete_poll_logs_message;
83
  polls_admin.runAJAX();
84
  } else {
85
- alert("<?php _e('Please check the \'Yes\' checkbox if you want to delete all logs.', 'wp-polls'); ?>");
86
  }
87
  }
88
  }
@@ -90,8 +74,7 @@ function delete_poll_logs(poll_confirm) {
90
  // Function: Delete Individual Poll Logs Message
91
  function delete_this_poll_logs_message() {
92
  document.getElementById('message').style.display = "block";
93
- Fat.fade_element("message", null, 3000, "#FFFF00");
94
- document.getElementById("poll_logs").innerHTML = "<?php _e('No poll logs available for this poll.', 'wp-polls'); ?>";
95
  document.getElementById("poll_logs_display").style.display = 'none';
96
  document.getElementById("poll_logs_display_none").style.display = 'block';
97
  }
@@ -103,7 +86,7 @@ function delete_this_poll_logs(poll_id, poll_confirm) {
103
  if(document.getElementById("delete_logs_yes").checked == true) {
104
  global_poll_id = poll_id;
105
  polls_admin.reset();
106
- polls_admin.setVar("do", "<?php _e('Delete Logs For This Poll Only', 'wp-polls'); ?>");
107
  polls_admin.setVar("delete_logs_yes", "yes");
108
  polls_admin.setVar("pollq_id", poll_id);
109
  polls_admin.method = 'POST';
@@ -111,7 +94,7 @@ function delete_this_poll_logs(poll_id, poll_confirm) {
111
  polls_admin.onCompletion = delete_this_poll_logs_message;
112
  polls_admin.runAJAX();
113
  } else {
114
- alert("<?php _e('Please check the \'Yes\' checkbox if you want to delete all logs for this poll ONLY.', 'wp-polls'); ?>");
115
  }
116
  }
117
  }
@@ -119,8 +102,6 @@ function delete_this_poll_logs(poll_id, poll_confirm) {
119
  // Function: Delete Poll Answer Message
120
  function delete_poll_ans_message() {
121
  document.getElementById('message').style.display = "block";
122
- Fat.fade_element("message", null, 3000, "#FFFF00");
123
- Fat.fade_element("poll-answer-" + global_poll_aid, null, 1000, "#FF3333");
124
  setTimeout("remove_poll_ans()", 1000);
125
  document.getElementById('poll_total_votes').innerHTML = (parseInt(document.getElementById('poll_total_votes').innerHTML) - parseInt(global_poll_aid_votes));
126
  poll_total_votes = parseInt(document.getElementById('pollq_totalvotes').value);
@@ -145,7 +126,7 @@ function delete_poll_ans(poll_id, poll_aid, poll_aid_vote, poll_confirm) {
145
  global_poll_aid = poll_aid;
146
  global_poll_aid_votes = poll_aid_vote;
147
  polls_admin.reset();
148
- polls_admin.setVar("do", "<?php _e('Delete Poll Answer', 'wp-polls'); ?>");
149
  polls_admin.setVar("pollq_id", poll_id);
150
  polls_admin.setVar("polla_aid", poll_aid);
151
  polls_admin.method = 'POST';
@@ -158,7 +139,6 @@ function delete_poll_ans(poll_id, poll_aid, poll_aid_vote, poll_confirm) {
158
  // Function: Open Poll Message
159
  function opening_poll_message() {
160
  document.getElementById('message').style.display = "block";
161
- Fat.fade_element("message", null, 3000, "#FFFF00");
162
  document.getElementById("open_poll").style.display = "none";
163
  document.getElementById("close_poll").style.display = "inline";
164
  }
@@ -169,7 +149,7 @@ function opening_poll(poll_id, poll_confirm) {
169
  if(open_poll_confirm) {
170
  global_poll_id = poll_id;
171
  polls_admin.reset();
172
- polls_admin.setVar("do", "<?php _e('Open Poll', 'wp-polls'); ?>");
173
  polls_admin.setVar("pollq_id", poll_id);
174
  polls_admin.method = 'POST';
175
  polls_admin.element = 'message';
@@ -181,7 +161,6 @@ function opening_poll(poll_id, poll_confirm) {
181
  // Function: Close Poll Message
182
  function closing_poll_message() {
183
  document.getElementById('message').style.display = "block";
184
- Fat.fade_element("message", null, 3000, "#FFFF00");
185
  document.getElementById("open_poll").style.display = "inline";
186
  document.getElementById("close_poll").style.display = "none";
187
  }
@@ -192,7 +171,7 @@ function closing_poll(poll_id, poll_confirm) {
192
  if(close_poll_confirm) {
193
  global_poll_id = poll_id;
194
  polls_admin.reset();
195
- polls_admin.setVar("do", "<?php _e('Close Poll', 'wp-polls'); ?>");
196
  polls_admin.setVar("pollq_id", poll_id);
197
  polls_admin.method = 'POST';
198
  polls_admin.element = 'message';
@@ -203,15 +182,15 @@ function closing_poll(poll_id, poll_confirm) {
203
 
204
  // Function: Insert Poll Quick Tag
205
  function insertPoll(where, myField) {
206
- var poll_id = prompt("<?php _e('Enter Poll ID', 'wp-polls'); ?>");
207
  while(isNaN(poll_id)) {
208
- poll_id = prompt("<?php _e('Error: Poll ID must be numeric', 'wp-polls'); ?>\n\n<?php _e('Please enter Poll ID again', 'wp-polls'); ?>");
209
  }
210
  if (poll_id > 0) {
211
  if(where == 'code') {
212
- edInsertContent(myField, '[poll=' + poll_id + ']');
213
  } else {
214
- return '[poll=' + poll_id + ']';
215
  }
216
  }
217
  }
 
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
+ | WordPress 2.5 Plugin: WP-Polls 2.30 |
5
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
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;
24
  // Function: Delete Poll Message
25
  function delete_poll_message() {
26
  document.getElementById('message').style.display = "block";
 
 
27
  setTimeout("remove_poll()", 1000);
28
  }
29
 
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';
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
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
  }
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
  }
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';
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
  }
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);
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';
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
  }
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';
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
  }
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';
182
 
183
  // Function: Insert Poll Quick Tag
184
  function insertPoll(where, myField) {
185
+ var poll_id = prompt(polls_admin_text_enter_poll_id);
186
  while(isNaN(poll_id)) {
187
+ poll_id = prompt(polls_admin_text_enter_poll_id_again);
188
  }
189
  if (poll_id > 0) {
190
  if(where == 'code') {
191
+ edInsertContent(myField, '[poll id="' + poll_id + '"]');
192
  } else {
193
+ return '[poll id="' + poll_id + '"]';
194
  }
195
  }
196
  }
polls/polls-css.css → polls-css.css RENAMED
@@ -1,8 +1,8 @@
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
- | WordPress 2.0 Plugin: WP-Polls 2.21 |
5
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
@@ -10,7 +10,7 @@
10
  | |
11
  | File Information: |
12
  | - Polls CSS File |
13
- | - wp-content/plugins/polls/polls-css.css |
14
  | |
15
  +----------------------------------------------------------------+
16
  */
@@ -55,6 +55,7 @@
55
  display: none;
56
  text-align: center;
57
  height: 16px;
 
58
  }
59
  .wp-polls-image {
60
  border: 0px;
@@ -63,14 +64,59 @@
63
  border:1px solid #c8c8c8;
64
  background-color: #f3f6f8;
65
  }
66
- /* Styles Used In WP-Admin */
67
- .wp-polls-usage-pre {
68
- margin: 20px;
69
- padding: 10px;
70
- border: 1px solid #c8c8c8;
71
- background-color: #f0f0f0;
72
- overflow: auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  }
 
 
 
 
 
 
 
 
74
  #wp-polls-pollbar-bg {
75
  width: 25px;
76
  height: 25px;
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
+ | WordPress 2.5 Plugin: WP-Polls 2.30 |
5
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
10
  | |
11
  | File Information: |
12
  | - Polls CSS File |
13
+ | - wp-content/plugins/wp-polls/polls-css.css |
14
  | |
15
  +----------------------------------------------------------------+
16
  */
55
  display: none;
56
  text-align: center;
57
  height: 16px;
58
+ line-height: 16px;
59
  }
60
  .wp-polls-image {
61
  border: 0px;
64
  border:1px solid #c8c8c8;
65
  background-color: #f3f6f8;
66
  }
67
+ /* Polls Archive Paging */
68
+ .wp-polls-paging a, .wp-polls-paging a:link {
69
+ padding: 2px 4px 2px 4px;
70
+ margin: 2px;
71
+ text-decoration: none;
72
+ border: 1px solid #0066cc;
73
+ color: #0066cc;
74
+ background-color: #FFFFFF;
75
+ }
76
+ .wp-polls-paging a:visited {
77
+ padding: 2px 4px 2px 4px;
78
+ margin: 2px;
79
+ text-decoration: none;
80
+ border: 1px solid #0066cc;
81
+ color: #0066cc;
82
+ background-color: #FFFFFF;
83
+ }
84
+ .wp-polls-paging a:hover {
85
+ border: 1px solid #000000;
86
+ color: #000000;
87
+ background-color: #FFFFFF;
88
+ }
89
+ .wp-polls-paging a:active {
90
+ padding: 2px 4px 2px 4px;
91
+ margin: 2px;
92
+ text-decoration: none;
93
+ border: 1px solid #0066cc;
94
+ color: #0066cc;
95
+ background-color: #FFFFFF;
96
+ }
97
+ .wp-polls-paging span.pages {
98
+ padding: 2px 4px 2px 4px;
99
+ margin: 2px 2px 2px 2px;
100
+ color: #000000;
101
+ border: 1px solid #000000;
102
+ background-color: #FFFFFF;
103
+ }
104
+ .wp-polls-paging span.current {
105
+ padding: 2px 4px 2px 4px;
106
+ margin: 2px;
107
+ font-weight: bold;
108
+ border: 1px solid #000000;
109
+ color: #000000;
110
+ background-color: #FFFFFF;
111
  }
112
+ .wp-polls-paging span.extend {
113
+ padding: 2px 4px 2px 4px;
114
+ margin: 2px;
115
+ border: 1px solid #000000;
116
+ color: #000000;
117
+ background-color: #FFFFFF;
118
+ }
119
+ /* Styles Used In WP-Admin */
120
  #wp-polls-pollbar-bg {
121
  width: 25px;
122
  height: 25px;
polls-js-packed.js ADDED
@@ -0,0 +1 @@
 
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/polls-js.php → polls-js.js RENAMED
@@ -1,9 +1,8 @@
1
- <?php
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.1 Plugin: WP-Polls 2.21 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -11,38 +10,18 @@
11
  | |
12
  | File Information: |
13
  | - Polls Javascript File |
14
- | - wp-content/plugins/polls/polls-js.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
18
 
19
 
20
- ### Include wp-config.php
21
- @require('../../../wp-config.php');
22
- cache_javascript_headers();
23
-
24
- ### Determine polls.php Path
25
- $polls_ajax_url = dirname($_SERVER['PHP_SELF']);
26
- if(substr($polls_ajax_url, -1) == '/') {
27
- $polls_ajax_url = substr($polls_ajax_url, 0, -1);
28
- }
29
-
30
- ### Get Poll AJAX Style
31
- $poll_ajax_style = get_option('poll_ajax_style');
32
- ?>
33
-
34
  // Variables
35
- var polls_ajax_url = "<?php echo $polls_ajax_url; ?>/polls.php";
36
- var polls_text_wait = "<?php _e('Your last request is still being processed. Please wait a while ...', 'wp-polls'); ?>";
37
- var polls_text_valid = "<?php _e('Please choose a valid poll answer.', 'wp-polls'); ?>";
38
- var polls_text_multiple = "<?php _e('Maximum number of choices allowed:', 'wp-polls'); ?>";
39
  var polls = new sack(polls_ajax_url);
40
  var poll_id = 0;
41
  var poll_answer_id = "";
42
  var poll_fadein_opacity = 0;
43
  var poll_fadeout_opacity = 100;
44
- var poll_show_loading = <?php echo intval($poll_ajax_style['loading']); ?>;
45
- var poll_show_fading = <?php echo intval($poll_ajax_style['fading']); ?>;
46
  var is_ie = (document.all && document.getElementById);
47
  var is_moz = (!document.all && document.getElementById);
48
  var is_opera = (navigator.userAgent.indexOf("Opera") > -1);
@@ -138,7 +117,7 @@ function poll_fadein_text() {
138
  poll_unloading_text();
139
  } else if(is_ie) {
140
  if(poll_show_fading) {
141
- document.getElementById('polls-' + poll_id + '-ans').filters.alpha.opacity = poll_fadein_opacity;
142
  } else {
143
  poll_fadein_opacity = 100;
144
  poll_unloading_text();
@@ -180,7 +159,7 @@ function poll_process() {
180
  poll_fadeout_opacity = 0;
181
  } else if(is_ie) {
182
  if(poll_show_fading) {
183
- document.getElementById('polls-' + poll_id + '-ans').filters.alpha.opacity = poll_fadeout_opacity;
184
  } else {
185
  poll_fadeout_opacity = 0;
186
  }
@@ -215,7 +194,7 @@ function poll_process_result() {
215
  poll_fadeout_opacity = 0;
216
  } else if(is_ie) {
217
  if(poll_show_fading) {
218
- document.getElementById('polls-' + poll_id + '-ans').filters.alpha.opacity = poll_fadeout_opacity;
219
  } else {
220
  poll_fadeout_opacity = 0;
221
  }
@@ -248,7 +227,7 @@ function poll_process_booth() {
248
  poll_fadeout_opacity = 0;
249
  } else if(is_ie) {
250
  if(poll_show_fading) {
251
- document.getElementById('polls-' + poll_id + '-ans').filters.alpha.opacity = poll_fadeout_opacity;
252
  } else {
253
  poll_fadeout_opacity = 0;
254
  }
@@ -271,4 +250,12 @@ function poll_process_booth() {
271
  poll_fadein_opacity = 0;
272
  poll_fadeout_opacity = 100;
273
  }
 
 
 
 
 
 
 
 
274
  }
 
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
+ | WordPress 2.5 Plugin: WP-Polls 2.30 |
5
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
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);
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();
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
  }
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
  }
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
  }
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
  }
polls/polls-logs.php → polls-logs.php RENAMED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.1 Plugin: WP-Polls 2.21 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -11,7 +11,7 @@
11
  | |
12
  | File Information: |
13
  | - Polls Logs |
14
- | - wp-content/plugins/polls/polls-logs.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
@@ -121,12 +121,12 @@ if(!empty($_POST['do'])) {
121
  <?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>'; } ?>
122
  <div class="wrap">
123
  <h2><?php _e('Poll\'s Logs', 'wp-polls'); ?></h2>
124
- <p><strong><?php echo $poll_question; ?></strong></p>
125
  <p>
126
- <?php printf(__('There are a total of <strong>%s</strong> recorded votes for this poll.', 'wp-polls'), $poll_totalrecorded); ?><br />
127
- <?php printf(__('<strong>&raquo;</strong> <strong>%s</strong> vote(s) are voted by registered users', 'wp-polls'), $poll_registered); ?><br />
128
- <?php printf(__('<strong>&raquo;</strong> <strong>%s</strong> vote(s) are voted by comment authors', 'wp-polls'), $poll_comments); ?><br />
129
- <?php printf(__('<strong>&raquo;</strong> <strong>%s</strong> vote(s) are voted by guests', 'wp-polls'), $poll_guest); ?>
130
  </p>
131
  </div>
132
  <?php if($poll_totalrecorded > 0) { ?>
@@ -137,11 +137,9 @@ if(!empty($_POST['do'])) {
137
  <td width="50%">
138
  <form method="post" action="<?php echo htmlspecialchars($base_page); ?>&amp;mode=logs&amp;id=<?php echo $poll_id; ?>">
139
  <p style="display: none;"><input type="hidden" name="filter" value="1" /></p>
140
- <table border="0" cellspacing="3" cellpadding="3">
141
  <tr>
142
- <td>
143
- <strong><?php _e('Display All Users That Voted For:', 'wp-polls'); ?></strong>
144
- </td>
145
  <td>
146
  <select name="users_voted_for" size="1">
147
  <?php
@@ -162,9 +160,7 @@ if(!empty($_POST['do'])) {
162
  </td>
163
  </tr>
164
  <tr>
165
- <td valign="top">
166
- <strong><?php _e('Voters To EXCLUDE', 'wp-polls'); ?></strong>
167
- </td>
168
  <td>
169
  <input type="checkbox" id="exclude_registered_1" name="exclude_registered" value="1" <?php checked('1', $exclude_registered); ?> />&nbsp;<label for="exclude_registered_1"><?php _e('Registered Users', 'wp-polls'); ?></label><br />
170
  <input type="checkbox" id="exclude_comment_1" name="exclude_comment" value="1" <?php checked('1', $exclude_comment); ?> />&nbsp;<label for="exclude_comment_1"><?php _e('Comment Authors', 'wp-polls'); ?></label><br />
@@ -181,11 +177,9 @@ if(!empty($_POST['do'])) {
181
  <?php if($poll_multiple > 0) { ?>
182
  <form method="post" action="<?php echo htmlspecialchars($base_page); ?>&amp;mode=logs&amp;id=<?php echo $poll_id; ?>">
183
  <p style="display: none;"><input type="hidden" name="filter" value="2" /></p>
184
- <table border="0" cellspacing="3" cellpadding="3">
185
  <tr>
186
- <td>
187
- <strong><?php _e('Display Users That Voted For: ', 'wp-polls'); ?></strong>
188
- </td>
189
  <td>
190
  <select name="num_choices_sign" size="1">
191
  <option value="more" <?php selected('more', $num_choices_sign); ?>><?php _e('More Than', 'wp-polls'); ?></option>
@@ -213,9 +207,7 @@ if(!empty($_POST['do'])) {
213
  </td>
214
  </tr>
215
  <tr>
216
- <td valign="top">
217
- <strong><?php _e('Voters To EXCLUDE', 'wp-polls'); ?></strong>
218
- </td>
219
  <td>
220
  <input type="checkbox" id="exclude_registered_2" name="exclude_registered_2" value="1" <?php checked('1', $exclude_registered_2); ?> />&nbsp;<label for="exclude_registered_2"><?php _e('Registered Users', 'wp-polls'); ?></label><br />
221
  <input type="checkbox" id="exclude_comment_2" name="exclude_comment_2" value="1" <?php checked('1', $exclude_comment_2); ?> />&nbsp;<label for="exclude_comment_2"><?php _e('Comment Authors', 'wp-polls'); ?></label><br />
@@ -237,11 +229,9 @@ if(!empty($_POST['do'])) {
237
  <?php if($poll_voters) { ?>
238
  <form method="post" action="<?php echo htmlspecialchars($base_page); ?>&amp;mode=logs&amp;id=<?php echo $poll_id; ?>">
239
  <p style="display: none;"><input type="hidden" name="filter" value="3" /></p>
240
- <table border="0" cellspacing="3" cellpadding="3">
241
  <tr>
242
- <td>
243
- <strong><?php _e('Display What This User Has Voted:', 'wp-polls'); ?></strong>
244
- </td>
245
  <td>
246
  <select name="what_user_voted" size="1">
247
  <?php
@@ -267,12 +257,11 @@ if(!empty($_POST['do'])) {
267
  &nbsp;
268
  <?php } // End if($poll_multiple > -1) ?>
269
  </td>
270
- <td>
271
- <input type="button" value="<?php _e('Clear Filter', 'wp-polls'); ?>" onclick="self.location.href = '<?php echo htmlspecialchars($base_page); ?>&amp;mode=logs&amp;id=<?php echo $poll_id; ?>';" class="button" />
272
- </td>
273
  </tr>
274
  </table>
275
  </div>
 
276
  <?php } // End if($poll_totalrecorded > 0) ?>
277
  <div class="wrap">
278
  <h2><?php _e('Poll Logs', 'wp-polls'); ?></h2>
@@ -282,7 +271,7 @@ if(!empty($_POST['do'])) {
282
  if(empty($_POST['do'])) {
283
  echo '<p>'.__('This default filter is limited to display only <strong>100</strong> records.', 'wp-polls').'</p>';
284
  }
285
- echo '<table width="100%" border="0" cellspacing="3" cellpadding="3">'."\n";
286
  $k = 1;
287
  $j = 0;
288
  $poll_last_aid = -1;
@@ -300,12 +289,12 @@ if(!empty($_POST['do'])) {
300
  $pollip_host = $poll_ip->pollip_host;
301
  $pollip_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_ip->pollip_timestamp));
302
  if($i%2 == 0) {
303
- $style = 'style=\'background-color: none\'';
304
  } else {
305
- $style = 'style=\'background-color: #eee\'';
306
  }
307
  if($pollip_user != $temp_pollip_user) {
308
- echo '<tr style="background-color: #b8d4ff">'."\n";
309
  echo "<td colspan=\"4\"><strong>".__('User', 'wp-polls')." $k: $pollip_user</strong></td>\n";
310
  echo '</tr>';
311
  $k++;
@@ -326,12 +315,12 @@ if(!empty($_POST['do'])) {
326
  $pollip_user = stripslashes($poll_ip->pollip_user);
327
  $pollip_ip = $poll_ip->pollip_ip;
328
  $pollip_host = $poll_ip->pollip_host;
329
- $pollip_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_ip->pollip_timestamp));
330
  if($pollip_aid != $poll_last_aid) {
331
  if($pollip_aid == 0) {
332
- echo "<tr style='background-color: #b8d4ff'>\n<td colspan=\"4\"><strong>$pollip_answers[$pollip_aid]</strong></td>\n</tr>\n";
333
  } else {
334
- echo "<tr style='background-color: #b8d4ff'>\n<td colspan=\"4\"><strong>".__('Answer', 'wp-polls')." $k: $pollip_answers[$pollip_aid]</strong></td>\n</tr>\n";
335
  $k++;
336
  }
337
  echo "<tr class=\"thead\">\n";
@@ -343,9 +332,9 @@ if(!empty($_POST['do'])) {
343
  $i = 1;
344
  }
345
  if($i%2 == 0) {
346
- $style = 'style=\'background-color: none\'';
347
  } else {
348
- $style = 'style=\'background-color: #eee\'';
349
  }
350
  echo "<tr $style>\n";
351
  echo "<td>$i</td>\n";
@@ -358,23 +347,25 @@ if(!empty($_POST['do'])) {
358
  $j++;
359
  }
360
  }
361
- echo "<tr class=\"thead\">\n";
362
- echo "<td colspan=\"4\">".sprintf(__('Total number of records that matches this filter: <strong>%s</strong>', 'wp-polls'), number_format($j))."</td>";
363
  echo "</tr>\n";
364
  echo '</table>'."\n";
365
  }
366
  ?>
367
  </div>
368
  <?php if(!empty($_POST['do'])) { ?>
369
- <div id="poll_logs_display_none" style="text-align: center; display: <?php if(!$poll_ips) { echo 'block'; } else { echo 'none'; } ?>;" ><?php _e('No poll logs matches the filter.', 'wp-polls'); ?></div>
370
  <?php } else { ?>
371
- <div id="poll_logs_display_none" style="text-align: center; display: <?php if(!$poll_logs_count) { echo 'block'; } else { echo 'none'; } ?>;" ><?php _e('No poll logs available for this poll.', 'wp-polls'); ?></div>
372
  <?php } ?>
373
  </div>
 
374
 
375
  <!-- Delete Poll Logs -->
376
  <div class="wrap">
377
  <h2><?php _e('Delete Poll Logs', 'wp-polls'); ?></h2>
 
378
  <div align="center" id="poll_logs">
379
  <?php if($poll_logs_count) { ?>
380
  <strong><?php _e('Are You Sure You Want To Delete Logs For This Poll Only?', 'wp-polls'); ?></strong><br /><br />
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.5 Plugin: WP-Polls 2.30 |
6
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
11
  | |
12
  | File Information: |
13
  | - Polls Logs |
14
+ | - wp-content/plugins/wp-polls/polls-logs.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
121
  <?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>'; } ?>
122
  <div class="wrap">
123
  <h2><?php _e('Poll\'s Logs', 'wp-polls'); ?></h2>
124
+ <h3><?php echo $poll_question; ?></h3>
125
  <p>
126
+ <?php printf(__('There are a total of <strong>%s</strong> recorded votes for this poll.', 'wp-polls'), number_format_i18n($poll_totalrecorded)); ?><br />
127
+ <?php printf(__('<strong>&raquo;</strong> <strong>%s</strong> vote(s) are voted by registered users', 'wp-polls'), number_format_i18n($poll_registered)); ?><br />
128
+ <?php printf(__('<strong>&raquo;</strong> <strong>%s</strong> vote(s) are voted by comment authors', 'wp-polls'), number_format_i18n($poll_comments)); ?><br />
129
+ <?php printf(__('<strong>&raquo;</strong> <strong>%s</strong> vote(s) are voted by guests', 'wp-polls'), number_format_i18n($poll_guest)); ?>
130
  </p>
131
  </div>
132
  <?php if($poll_totalrecorded > 0) { ?>
137
  <td width="50%">
138
  <form method="post" action="<?php echo htmlspecialchars($base_page); ?>&amp;mode=logs&amp;id=<?php echo $poll_id; ?>">
139
  <p style="display: none;"><input type="hidden" name="filter" value="1" /></p>
140
+ <table class="form-table">
141
  <tr>
142
+ <th scope="row" valign="top"><?php _e('Display All Users That Voted For', 'wp-polls'); ?></th>
 
 
143
  <td>
144
  <select name="users_voted_for" size="1">
145
  <?php
160
  </td>
161
  </tr>
162
  <tr>
163
+ <th scope="row" valign="top"><?php _e('Voters To EXCLUDE', 'wp-polls'); ?></th>
 
 
164
  <td>
165
  <input type="checkbox" id="exclude_registered_1" name="exclude_registered" value="1" <?php checked('1', $exclude_registered); ?> />&nbsp;<label for="exclude_registered_1"><?php _e('Registered Users', 'wp-polls'); ?></label><br />
166
  <input type="checkbox" id="exclude_comment_1" name="exclude_comment" value="1" <?php checked('1', $exclude_comment); ?> />&nbsp;<label for="exclude_comment_1"><?php _e('Comment Authors', 'wp-polls'); ?></label><br />
177
  <?php if($poll_multiple > 0) { ?>
178
  <form method="post" action="<?php echo htmlspecialchars($base_page); ?>&amp;mode=logs&amp;id=<?php echo $poll_id; ?>">
179
  <p style="display: none;"><input type="hidden" name="filter" value="2" /></p>
180
+ <table class="form-table">
181
  <tr>
182
+ <th scope="row" valign="top"><?php _e('Display Users That Voted For', 'wp-polls'); ?></th>
 
 
183
  <td>
184
  <select name="num_choices_sign" size="1">
185
  <option value="more" <?php selected('more', $num_choices_sign); ?>><?php _e('More Than', 'wp-polls'); ?></option>
207
  </td>
208
  </tr>
209
  <tr>
210
+ <th scope="row" valign="top"><?php _e('Voters To EXCLUDE', 'wp-polls'); ?></th>
 
 
211
  <td>
212
  <input type="checkbox" id="exclude_registered_2" name="exclude_registered_2" value="1" <?php checked('1', $exclude_registered_2); ?> />&nbsp;<label for="exclude_registered_2"><?php _e('Registered Users', 'wp-polls'); ?></label><br />
213
  <input type="checkbox" id="exclude_comment_2" name="exclude_comment_2" value="1" <?php checked('1', $exclude_comment_2); ?> />&nbsp;<label for="exclude_comment_2"><?php _e('Comment Authors', 'wp-polls'); ?></label><br />
229
  <?php if($poll_voters) { ?>
230
  <form method="post" action="<?php echo htmlspecialchars($base_page); ?>&amp;mode=logs&amp;id=<?php echo $poll_id; ?>">
231
  <p style="display: none;"><input type="hidden" name="filter" value="3" /></p>
232
+ <table class="form-table">
233
  <tr>
234
+ <th scope="row" valign="top"><?php _e('Display What This User Has Voted', 'wp-polls'); ?></th>
 
 
235
  <td>
236
  <select name="what_user_voted" size="1">
237
  <?php
257
  &nbsp;
258
  <?php } // End if($poll_multiple > -1) ?>
259
  </td>
260
+ <td align="center"><input type="button" value="<?php _e('Clear Filter', 'wp-polls'); ?>" onclick="self.location.href = '<?php echo htmlspecialchars($base_page); ?>&amp;mode=logs&amp;id=<?php echo $poll_id; ?>';" class="button" /></td>
 
 
261
  </tr>
262
  </table>
263
  </div>
264
+ <p>&nbsp;</p>
265
  <?php } // End if($poll_totalrecorded > 0) ?>
266
  <div class="wrap">
267
  <h2><?php _e('Poll Logs', 'wp-polls'); ?></h2>
271
  if(empty($_POST['do'])) {
272
  echo '<p>'.__('This default filter is limited to display only <strong>100</strong> records.', 'wp-polls').'</p>';
273
  }
274
+ echo '<table class="widefat">'."\n";
275
  $k = 1;
276
  $j = 0;
277
  $poll_last_aid = -1;
289
  $pollip_host = $poll_ip->pollip_host;
290
  $pollip_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_ip->pollip_timestamp));
291
  if($i%2 == 0) {
292
+ $style = '';
293
  } else {
294
+ $style = 'class="alternate"';
295
  }
296
  if($pollip_user != $temp_pollip_user) {
297
+ echo '<tr class="highlight">'."\n";
298
  echo "<td colspan=\"4\"><strong>".__('User', 'wp-polls')." $k: $pollip_user</strong></td>\n";
299
  echo '</tr>';
300
  $k++;
315
  $pollip_user = stripslashes($poll_ip->pollip_user);
316
  $pollip_ip = $poll_ip->pollip_ip;
317
  $pollip_host = $poll_ip->pollip_host;
318
+ $pollip_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_ip->pollip_timestamp));
319
  if($pollip_aid != $poll_last_aid) {
320
  if($pollip_aid == 0) {
321
+ echo "<tr class=\"highlight\">\n<td colspan=\"4\"><strong>$pollip_answers[$pollip_aid]</strong></td>\n</tr>\n";
322
  } else {
323
+ echo "<tr class=\"highlight\">\n<td colspan=\"4\"><strong>".__('Answer', 'wp-polls')." $k: $pollip_answers[$pollip_aid]</strong></td>\n</tr>\n";
324
  $k++;
325
  }
326
  echo "<tr class=\"thead\">\n";
332
  $i = 1;
333
  }
334
  if($i%2 == 0) {
335
+ $style = '';
336
  } else {
337
+ $style = 'class="alternate"';
338
  }
339
  echo "<tr $style>\n";
340
  echo "<td>$i</td>\n";
347
  $j++;
348
  }
349
  }
350
+ echo "<tr class=\"highlight\">\n";
351
+ echo "<td colspan=\"4\">".sprintf(__('Total number of records that matches this filter: <strong>%s</strong>', 'wp-polls'), number_format_i18n($j))."</td>";
352
  echo "</tr>\n";
353
  echo '</table>'."\n";
354
  }
355
  ?>
356
  </div>
357
  <?php if(!empty($_POST['do'])) { ?>
358
+ <br class="clear" /><div id="poll_logs_display_none" style="text-align: center; display: <?php if(!$poll_ips) { echo 'block'; } else { echo 'none'; } ?>;" ><?php _e('No poll logs matches the filter.', 'wp-polls'); ?></div>
359
  <?php } else { ?>
360
+ <br class="clear" /><div id="poll_logs_display_none" style="text-align: center; display: <?php if(!$poll_logs_count) { echo 'block'; } else { echo 'none'; } ?>;" ><?php _e('No poll logs available for this poll.', 'wp-polls'); ?></div>
361
  <?php } ?>
362
  </div>
363
+ <p>&nbsp;</p>
364
 
365
  <!-- Delete Poll Logs -->
366
  <div class="wrap">
367
  <h2><?php _e('Delete Poll Logs', 'wp-polls'); ?></h2>
368
+ <br class="clear" />
369
  <div align="center" id="poll_logs">
370
  <?php if($poll_logs_count) { ?>
371
  <strong><?php _e('Are You Sure You Want To Delete Logs For This Poll Only?', 'wp-polls'); ?></strong><br /><br />
polls/polls-manager.php → polls-manager.php RENAMED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.1 Plugin: WP-Polls 2.21 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -11,7 +11,7 @@
11
  | |
12
  | File Information: |
13
  | - Manage Your Polls |
14
- | - wp-content/plugins/polls/polls-manager.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
@@ -24,7 +24,7 @@ if(!current_user_can('manage_polls')) {
24
 
25
 
26
  ### Variables Variables Variables
27
- $base_name = plugin_basename('polls/polls-manager.php');
28
  $base_page = 'admin.php?page='.$base_name;
29
  $mode = trim($_GET['mode']);
30
  $poll_id = intval($_GET['id']);
@@ -229,12 +229,12 @@ switch($mode) {
229
  function create_poll_answer() {
230
  // Create Elements
231
  var poll_tr = document.createElement("tr");
232
- var poll_td1 = document.createElement("td");
233
  var poll_td2 = document.createElement("td");
234
  var poll_td3 = document.createElement("td");
235
  var poll_answer = document.createElement("input");
236
  var poll_votes = document.createElement("input");
237
- var poll_answer_count = document.createTextNode("<?php _e('Answer', 'wp-polls'); ?> " + (count_poll_answer+1) + ":");
238
  var poll_votes_count = document.createTextNode("0 ");
239
  var poll_answer_bold = document.createElement("strong");
240
  var poll_option = document.createElement("option");
@@ -254,11 +254,12 @@ switch($mode) {
254
  poll_option.setAttribute('value', count_poll_answer);
255
  poll_option.setAttribute('id', "pollq-multiple-" + (count_poll_answer+1));
256
  // Elements - TD/TR
257
- if(count_poll_answer%2 != 0) { poll_tr.style.background = "#eee"; }
258
  poll_tr.setAttribute('id', "poll-answer-new-" + count_poll_answer_new);
259
  poll_td1.setAttribute('width', "20%");
 
 
260
  poll_td2.setAttribute('width', "60%");
261
- poll_td3.setAttribute('width', "10%");
262
  poll_td3.setAttribute('align', "right");
263
  // Appending To Elements
264
  poll_tr.appendChild(poll_td1);
@@ -295,6 +296,7 @@ switch($mode) {
295
  }
296
  /* ]]> */
297
  </script>
 
298
  <?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>'; } ?>
299
 
300
  <!-- Edit Poll -->
@@ -305,20 +307,20 @@ switch($mode) {
305
  <h2><?php _e('Edit Poll', 'wp-polls'); ?></h2>
306
  <!-- Poll Question -->
307
  <h3><?php _e('Poll Question', 'wp-polls'); ?></h3>
308
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
309
- <tr style="background-color: #eee;">
310
- <td width="20%"><strong><?php _e('Question', 'wp-polls') ?></strong></td>
311
  <td width="80%"><input type="text" size="70" name="pollq_question" value="<?php echo htmlspecialchars($poll_question_text); ?>" /></td>
312
  </tr>
313
  </table>
314
  <!-- Poll Answers -->
315
  <h3><?php _e('Poll Answers', 'wp-polls'); ?></h3>
316
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
317
  <thead>
318
- <tr class="thead">
319
- <td width="20%"><strong><?php _e('Answer No.:', 'wp-polls') ?></strong></td>
320
- <td width="60%"><strong><?php _e('Answer Text:', 'wp-polls') ?></strong></td>
321
- <td width="20%" align="right"><strong><?php _e('No. Of Votes', 'wp-polls') ?></strong></td>
322
  </tr>
323
  </thead>
324
  <tbody id="poll_answers">
@@ -329,20 +331,15 @@ switch($mode) {
329
  $pollip_answers = array();
330
  $pollip_answers[0] = __('Null Votes', 'wp-polls');
331
  foreach($poll_answers as $poll_answer) {
332
- if($i%2 == 0) {
333
- $style = 'style=\'background: none;\'';
334
- } else {
335
- $style = 'style=\'background-color: #eee;\'';
336
- }
337
  $polla_aid = intval($poll_answer->polla_aid);
338
  $polla_answers = stripslashes($poll_answer->polla_answers);
339
  $polla_votes = intval($poll_answer->polla_votes);
340
  $pollip_answers[$polla_aid] = $polla_answers;
341
- echo "<tr id=\"poll-answer-$polla_aid\" $style>\n";
342
- echo '<td width="20%"><strong>'.sprintf(__('Answer %s:', 'wp-polls'), $i).'</strong></td>'."\n";
343
  echo "<td width=\"60%\"><input type=\"text\" size=\"50\" maxlength=\"200\" name=\"polla_aid-$polla_aid\" value=\"".htmlspecialchars($polla_answers)."\" />&nbsp;&nbsp;&nbsp;";
344
- echo "<input type=\"button\" value=\"".__('Delete', 'wp-polls')."\" onclick=\"delete_poll_ans($poll_id, $polla_aid, $polla_votes, '".sprintf(js_escape(__('You are about to delete this poll\'s answer \'%s\'.', 'wp-polls')), htmlspecialchars($polla_answers))."');\" class=\"button\" /></td>\n";
345
- echo "<td width=\"20%\" align=\"right\">$polla_votes <input type=\"text\" size=\"4\" id=\"polla_votes-$polla_aid\" name=\"polla_votes-$polla_aid\" value=\"$polla_votes\" onblur=\"check_totalvotes();\" /></td>\n</tr>\n";
346
  $poll_actual_totalvotes += $polla_votes;
347
  $i++;
348
  }
@@ -358,15 +355,15 @@ switch($mode) {
358
  <tr>
359
  <td width="20%">&nbsp;</td>
360
  <td width="60%">&nbsp;</td>
361
- <td width="20%" align="right"><strong><?php _e('Total Voters:', 'wp-polls'); ?><?php echo $poll_totalvoters; ?></strong> <input type="text" size="4" name="pollq_totalvoters" value="<?php echo $poll_totalvoters; ?>" /></td>
362
  </tr>
363
  </tbody>
364
  </table>
365
  <!-- Poll Multiple Answers -->
366
  <h3><?php _e('Poll Multiple Answers', 'wp-polls') ?></h3>
367
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
368
- <tr style="background-color: #eee;">
369
- <td width="40%" valign="top"><strong><?php _e('Allows Users To Select More Than One Answer?', 'wp-polls'); ?></strong></td>
370
  <td width="60%">
371
  <select name="pollq_multiple_yes" id="pollq_multiple_yes" size="1" onchange="check_pollq_multiple();">
372
  <option value="0"<?php selected('0', $poll_multiple); ?>><?php _e('No', 'wp-polls'); ?></option>
@@ -375,9 +372,9 @@ switch($mode) {
375
  </td>
376
  </tr>
377
  <tr>
378
- <td width="40%" valign="top"><strong><?php _e('Maximum Number Of Selected Answers Allowed?', 'wp-polls') ?></strong></td>
379
  <td width="60%">
380
- <select name="pollq_multiple" id="pollq_multiple" size="1" <?php if($poll_multiple == 0) { echo 'disabled="true"'; } ?>>
381
  <?php
382
  for($i = 1; $i <= $poll_noquestion; $i++) {
383
  if($poll_multiple > 0 && $poll_multiple == $i) {
@@ -393,9 +390,9 @@ switch($mode) {
393
  </table>
394
  <!-- Poll Start/End Date -->
395
  <h3><?php _e('Poll Start/End Date', 'wp-polls'); ?></h3>
396
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
397
- <tr style="background-color: #eee;">
398
- <td width="20%" valign="top"><strong><?php _e('Start Date/Time', 'wp-polls'); ?></strong>:</td>
399
  <td width="80%">
400
  <?php echo mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_timestamp)); ?><br />
401
  <input type="checkbox" name="edit_polltimestamp" id="edit_polltimestamp" value="1" onclick="check_polltimestamp()" />&nbsp;<label for="edit_polltimestamp"><?php _e('Edit Start Date/Time', 'wp-polls'); ?></label><br />
@@ -403,7 +400,7 @@ switch($mode) {
403
  </td>
404
  </tr>
405
  <tr>
406
- <td width="20%" valign="top"><strong><?php _e('End Date/Time', 'wp-polls'); ?></strong>:</td>
407
  <td width="80%">
408
  <?php
409
  if(empty($poll_expiry)) {
@@ -438,8 +435,8 @@ switch($mode) {
438
  $poll_close_display = 'none';
439
  }
440
  ?>
441
- <input type="button" class="button" name="do" id="close_poll" value="<?php _e('Close Poll', 'wp-polls'); ?>" onclick="closing_poll(<?php echo $poll_id; ?>, '<?php printf(js_escape(__('You are about to CLOSE this poll \'%s\'.', 'wp-polls')), htmlspecialchars($poll_question_text)); ?>');" style="display: <?php echo $poll_close_display; ?>;" />
442
- <input type="button" class="button" name="do" id="open_poll" value="<?php _e('Open Poll', 'wp-polls'); ?>" onclick="opening_poll(<?php echo $poll_id; ?>, '<?php printf(js_escape(__('You are about to OPEN this poll \'%s\'.', 'wp-polls')), htmlspecialchars($poll_question_text)); ?>');" style="display: <?php echo $poll_open_display; ?>;" />
443
  &nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-polls'); ?>" class="button" onclick="javascript:history.go(-1)" />
444
  </p>
445
  </div>
@@ -452,134 +449,141 @@ switch($mode) {
452
  $total_ans = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->pollsa");
453
  $total_votes = 0;
454
  $total_voters = 0;
455
- ?>
456
  <!-- Last Action -->
457
  <div id="message" class="updated" style="display: none;"></div>
458
 
459
  <!-- Manage Polls -->
460
  <div class="wrap">
461
- <h2><?php _e('Manage Polls', 'wp-polls'); ?></h2>
462
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
463
- <thead>
464
- <tr class="thead">
465
- <th><?php _e('ID', 'wp-polls'); ?></th>
466
- <th><?php _e('Question', 'wp-polls'); ?></th>
467
- <th><?php _e('Total Voters', 'wp-polls'); ?></th>
468
- <th><?php _e('Start Date/Time', 'wp-polls'); ?></th>
469
- <th><?php _e('End Date/Time', 'wp-polls'); ?></th>
470
- <th><?php _e('Status', 'wp-polls'); ?></th>
471
- <th colspan="3"><?php _e('Action', 'wp-polls'); ?></th>
472
- </tr>
473
- </thead>
474
- <tbody id="manage_polls">
475
- <?php
476
- if($polls) {
477
- if(function_exists('dynamic_sidebar')) {
478
- $options = get_option('widget_polls');
479
- $multiple_polls = explode(',', $options['multiple_polls']);
480
- } else {
481
- $multiple_polls = array();
482
- }
483
- $i = 0;
484
- $current_poll = intval(get_option('poll_currentpoll'));
485
- $latest_poll = intval(get_option('poll_latestpoll'));
486
- foreach($polls as $poll) {
487
- $poll_id = intval($poll->pollq_id);
488
- $poll_question = stripslashes($poll->pollq_question);
489
- $poll_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll->pollq_timestamp));
490
- $poll_totalvotes = intval($poll->pollq_totalvotes);
491
- $poll_totalvoters = intval($poll->pollq_totalvoters);
492
- $poll_active = intval($poll->pollq_active);
493
- $poll_expiry = trim($poll->pollq_expiry);
494
- if(empty($poll_expiry)) {
495
- $poll_expiry_text = __('No Expiry', 'wp-polls');
496
  } else {
497
- $poll_expiry_text = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_expiry));
498
  }
499
- if($i%2 == 0) {
500
- $style = 'style=\'background-color: #eee;\'';
501
- } else {
502
- $style = 'style=\'background: none;\'';
503
- }
504
- if($current_poll > 0) {
505
- if($current_poll == $poll_id) {
506
- $style = 'style=\'background-color: #b8d4ff;\'';
 
 
 
 
 
 
 
507
  }
508
- } elseif($current_poll == 0) {
509
- if($poll_id == $latest_poll) {
510
- $style = 'style=\'background-color: #b8d4ff;\'';
 
511
  }
512
- } else if(in_array($poll_id, $multiple_polls)) {
513
- $style = 'style=\'background-color: #b8d4ff;\'';
514
- }
515
- echo "<tr id=\"poll-$poll_id\" $style>\n";
516
- echo "<td><strong>$poll_id</strong></td>\n";
517
- echo '<td>';
518
- if($current_poll > 0) {
519
- if($current_poll == $poll_id) {
520
- echo '<strong>'.__('Displayed:', 'wp-polls').'</strong> ';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  }
522
- } elseif($current_poll == 0) {
523
- if($poll_id == $latest_poll) {
524
- echo '<strong>'.__('Displayed:', 'wp-polls').'</strong> ';
 
 
 
 
 
 
 
 
525
  }
526
- } else if(in_array($poll_id, $multiple_polls)) {
527
- echo '<strong>'.__('Displayed:', 'wp-polls').'</strong> ';
528
- }
529
- echo "$poll_question</td>\n";
530
- echo "<td>$poll_totalvoters</td>\n";
531
- echo "<td>$poll_date</td>\n";
532
- echo "<td>$poll_expiry_text</td>\n";
533
- echo '<td>';
534
- if($poll_active == 1) {
535
- _e('Open', 'wp-polls');
536
- } elseif($poll_active == -1) {
537
- _e('Future', 'wp-polls');
538
- } else {
539
- _e('Closed', 'wp-polls');
540
  }
541
- echo "</td>\n";
542
- echo "<td><a href=\"$base_page&amp;mode=logs&amp;id=$poll_id\" class=\"edit\">".__('Logs', 'wp-polls')."</a></td>\n";
543
- echo "<td><a href=\"$base_page&amp;mode=edit&amp;id=$poll_id\" class=\"edit\">".__('Edit', 'wp-polls')."</a></td>\n";
544
- echo "<td><a href=\"#DeletePoll\" onclick=\"delete_poll($poll_id, '".sprintf(js_escape(__('You are about to delete this poll, \'%s\'.', 'wp-polls')), $poll_question)."')\" class=\"delete\">".__('Delete', 'wp-polls')."</a></td>\n";
545
- echo '</tr>';
546
- $i++;
547
- $total_votes+= $poll_totalvotes;
548
- $total_voters+= $poll_totalvoters;
549
-
550
  }
551
- } else {
552
- echo '<tr><td colspan="9" align="center"><strong>'.__('No Polls Found', 'wp-polls').'</strong></td></tr>';
553
- }
554
- ?>
555
- </tbody>
556
  </table>
557
  </div>
 
 
558
  <!-- Polls Stats -->
559
  <div class="wrap">
560
- <h2><?php _e('Polls Stats', 'wp-polls'); ?></h2>
561
- <table border="0" cellspacing="3" cellpadding="3">
 
562
  <tr>
563
- <th align="left"><?php _e('Total Polls:', 'wp-polls'); ?></th>
564
- <td align="left"><?php echo $i; ?></td>
565
  </tr>
566
- <tr>
567
- <th align="left"><?php _e('Total Polls\' Answers:', 'wp-polls'); ?></th>
568
- <td align="left"><?php echo number_format($total_ans); ?></td>
569
  </tr>
570
  <tr>
571
- <th align="left"><?php _e('Total Votes Casted:', 'wp-polls'); ?></th>
572
- <td align="left"><?php echo number_format($total_votes); ?></td>
573
  </tr>
574
- <tr>
575
- <th align="left"><?php _e('Total Voters:', 'wp-polls'); ?></th>
576
- <td align="left"><?php echo number_format($total_voters); ?></td>
577
  </tr>
578
  </table>
579
  </div>
 
 
580
  <!-- Delete Polls Logs -->
581
  <div class="wrap">
582
  <h2><?php _e('Polls Logs', 'wp-polls'); ?></h2>
 
583
  <div align="center" id="poll_logs">
584
  <?php
585
  $poll_ips = intval($wpdb->get_var("SELECT COUNT(pollip_id) FROM $wpdb->pollsip"));
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.5 Plugin: WP-Polls 2.30 |
6
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
11
  | |
12
  | File Information: |
13
  | - Manage Your Polls |
14
+ | - wp-content/plugins/wp-polls/polls-manager.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
24
 
25
 
26
  ### Variables Variables Variables
27
+ $base_name = plugin_basename('wp-polls/polls-manager.php');
28
  $base_page = 'admin.php?page='.$base_name;
29
  $mode = trim($_GET['mode']);
30
  $poll_id = intval($_GET['id']);
229
  function create_poll_answer() {
230
  // Create Elements
231
  var poll_tr = document.createElement("tr");
232
+ var poll_td1 = document.createElement("th");
233
  var poll_td2 = document.createElement("td");
234
  var poll_td3 = document.createElement("td");
235
  var poll_answer = document.createElement("input");
236
  var poll_votes = document.createElement("input");
237
+ var poll_answer_count = document.createTextNode("<?php _e('Answer', 'wp-polls'); ?> " + (count_poll_answer+1));
238
  var poll_votes_count = document.createTextNode("0 ");
239
  var poll_answer_bold = document.createElement("strong");
240
  var poll_option = document.createElement("option");
254
  poll_option.setAttribute('value', count_poll_answer);
255
  poll_option.setAttribute('id', "pollq-multiple-" + (count_poll_answer+1));
256
  // Elements - TD/TR
 
257
  poll_tr.setAttribute('id', "poll-answer-new-" + count_poll_answer_new);
258
  poll_td1.setAttribute('width', "20%");
259
+ poll_td1.setAttribute('scope', "row");
260
+ poll_td1.setAttribute('valign', "top");
261
  poll_td2.setAttribute('width', "60%");
262
+ poll_td3.setAttribute('width', "20%");
263
  poll_td3.setAttribute('align', "right");
264
  // Appending To Elements
265
  poll_tr.appendChild(poll_td1);
296
  }
297
  /* ]]> */
298
  </script>
299
+
300
  <?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>'; } ?>
301
 
302
  <!-- Edit Poll -->
307
  <h2><?php _e('Edit Poll', 'wp-polls'); ?></h2>
308
  <!-- Poll Question -->
309
  <h3><?php _e('Poll Question', 'wp-polls'); ?></h3>
310
+ <table class="form-table">
311
+ <tr>
312
+ <th width="20%" scope="row" valign="top"><?php _e('Question', 'wp-polls') ?></th>
313
  <td width="80%"><input type="text" size="70" name="pollq_question" value="<?php echo htmlspecialchars($poll_question_text); ?>" /></td>
314
  </tr>
315
  </table>
316
  <!-- Poll Answers -->
317
  <h3><?php _e('Poll Answers', 'wp-polls'); ?></h3>
318
+ <table class="form-table">
319
  <thead>
320
+ <tr>
321
+ <th width="20%" scope="row" valign="top"><?php _e('Answer No.', 'wp-polls') ?></th>
322
+ <th width="60%" scope="row" valign="top"><?php _e('Answer Text', 'wp-polls') ?></th>
323
+ <th width="20%" scope="row" valign="top" style="text-align: right;"><?php _e('No. Of Votes', 'wp-polls') ?></th>
324
  </tr>
325
  </thead>
326
  <tbody id="poll_answers">
331
  $pollip_answers = array();
332
  $pollip_answers[0] = __('Null Votes', 'wp-polls');
333
  foreach($poll_answers as $poll_answer) {
 
 
 
 
 
334
  $polla_aid = intval($poll_answer->polla_aid);
335
  $polla_answers = stripslashes($poll_answer->polla_answers);
336
  $polla_votes = intval($poll_answer->polla_votes);
337
  $pollip_answers[$polla_aid] = $polla_answers;
338
+ echo "<tr id=\"poll-answer-$polla_aid\">\n";
339
+ echo '<th width="20%" scope="row" valign="top">'.sprintf(__('Answer %s', 'wp-polls'), $i).'</th>'."\n";
340
  echo "<td width=\"60%\"><input type=\"text\" size=\"50\" maxlength=\"200\" name=\"polla_aid-$polla_aid\" value=\"".htmlspecialchars($polla_answers)."\" />&nbsp;&nbsp;&nbsp;";
341
+ echo "<input type=\"button\" value=\"".__('Delete', 'wp-polls')."\" onclick=\"delete_poll_ans($poll_id, $polla_aid, $polla_votes, '".sprintf(js_escape(__('You are about to delete this poll\'s answer \'%s\'.', 'wp-polls')), js_escape(htmlspecialchars($polla_answers)))."');\" class=\"button\" /></td>\n";
342
+ echo '<td width="20%" align="right">'.number_format_i18n($polla_votes)." <input type=\"text\" size=\"4\" id=\"polla_votes-$polla_aid\" name=\"polla_votes-$polla_aid\" value=\"$polla_votes\" onblur=\"check_totalvotes();\" /></td>\n</tr>\n";
343
  $poll_actual_totalvotes += $polla_votes;
344
  $i++;
345
  }
355
  <tr>
356
  <td width="20%">&nbsp;</td>
357
  <td width="60%">&nbsp;</td>
358
+ <td width="20%" align="right"><strong><?php _e('Total Voters:', 'wp-polls'); ?><?php echo number_format_i18n($poll_totalvoters); ?></strong> <input type="text" size="4" name="pollq_totalvoters" value="<?php echo $poll_totalvoters; ?>" /></td>
359
  </tr>
360
  </tbody>
361
  </table>
362
  <!-- Poll Multiple Answers -->
363
  <h3><?php _e('Poll Multiple Answers', 'wp-polls') ?></h3>
364
+ <table class="form-table">
365
+ <tr>
366
+ <th width="40%" scope="row" valign="top"><?php _e('Allows Users To Select More Than One Answer?', 'wp-polls'); ?></th>
367
  <td width="60%">
368
  <select name="pollq_multiple_yes" id="pollq_multiple_yes" size="1" onchange="check_pollq_multiple();">
369
  <option value="0"<?php selected('0', $poll_multiple); ?>><?php _e('No', 'wp-polls'); ?></option>
372
  </td>
373
  </tr>
374
  <tr>
375
+ <th width="40%" scope="row" valign="top"><?php _e('Maximum Number Of Selected Answers Allowed?', 'wp-polls') ?></th>
376
  <td width="60%">
377
+ <select name="pollq_multiple" id="pollq_multiple" size="1" <?php if($poll_multiple == 0) { echo 'disabled="disabled"'; } ?>>
378
  <?php
379
  for($i = 1; $i <= $poll_noquestion; $i++) {
380
  if($poll_multiple > 0 && $poll_multiple == $i) {
390
  </table>
391
  <!-- Poll Start/End Date -->
392
  <h3><?php _e('Poll Start/End Date', 'wp-polls'); ?></h3>
393
+ <table class="form-table">
394
+ <tr>
395
+ <th width="20%" scope="row" valign="top"><?php _e('Start Date/Time', 'wp-polls'); ?></th>
396
  <td width="80%">
397
  <?php echo mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_timestamp)); ?><br />
398
  <input type="checkbox" name="edit_polltimestamp" id="edit_polltimestamp" value="1" onclick="check_polltimestamp()" />&nbsp;<label for="edit_polltimestamp"><?php _e('Edit Start Date/Time', 'wp-polls'); ?></label><br />
400
  </td>
401
  </tr>
402
  <tr>
403
+ <th width="20%" scope="row" valign="top"><?php _e('End Date/Time', 'wp-polls'); ?></th>
404
  <td width="80%">
405
  <?php
406
  if(empty($poll_expiry)) {
435
  $poll_close_display = 'none';
436
  }
437
  ?>
438
+ <input type="button" class="button" name="do" id="close_poll" value="<?php _e('Close Poll', 'wp-polls'); ?>" onclick="closing_poll(<?php echo $poll_id; ?>, '<?php printf(js_escape(__('You are about to CLOSE this poll \'%s\'.', 'wp-polls')), htmlspecialchars(js_escape($poll_question_text))); ?>');" style="display: <?php echo $poll_close_display; ?>;" />
439
+ <input type="button" class="button" name="do" id="open_poll" value="<?php _e('Open Poll', 'wp-polls'); ?>" onclick="opening_poll(<?php echo $poll_id; ?>, '<?php printf(js_escape(__('You are about to OPEN this poll \'%s\'.', 'wp-polls')), htmlspecialchars(js_escape($poll_question_text))); ?>');" style="display: <?php echo $poll_open_display; ?>;" />
440
  &nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-polls'); ?>" class="button" onclick="javascript:history.go(-1)" />
441
  </p>
442
  </div>
449
  $total_ans = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->pollsa");
450
  $total_votes = 0;
451
  $total_voters = 0;
452
+ ?>
453
  <!-- Last Action -->
454
  <div id="message" class="updated" style="display: none;"></div>
455
 
456
  <!-- Manage Polls -->
457
  <div class="wrap">
458
+ <h2><?php _e('Manage Polls', 'wp-polls'); ?></h2>
459
+ <br style="clear" />
460
+ <table class="widefat">
461
+ <thead>
462
+ <tr>
463
+ <th><?php _e('ID', 'wp-polls'); ?></th>
464
+ <th><?php _e('Question', 'wp-polls'); ?></th>
465
+ <th><?php _e('Total Voters', 'wp-polls'); ?></th>
466
+ <th><?php _e('Start Date/Time', 'wp-polls'); ?></th>
467
+ <th><?php _e('End Date/Time', 'wp-polls'); ?></th>
468
+ <th><?php _e('Status', 'wp-polls'); ?></th>
469
+ <th colspan="3"><?php _e('Action', 'wp-polls'); ?></th>
470
+ </tr>
471
+ </thead>
472
+ <tbody id="manage_polls">
473
+ <?php
474
+ if($polls) {
475
+ if(function_exists('dynamic_sidebar')) {
476
+ $options = get_option('widget_polls');
477
+ $multiple_polls = explode(',', $options['multiple_polls']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478
  } else {
479
+ $multiple_polls = array();
480
  }
481
+ $i = 0;
482
+ $current_poll = intval(get_option('poll_currentpoll'));
483
+ $latest_poll = intval(get_option('poll_latestpoll'));
484
+ foreach($polls as $poll) {
485
+ $poll_id = intval($poll->pollq_id);
486
+ $poll_question = stripslashes($poll->pollq_question);
487
+ $poll_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll->pollq_timestamp));
488
+ $poll_totalvotes = intval($poll->pollq_totalvotes);
489
+ $poll_totalvoters = intval($poll->pollq_totalvoters);
490
+ $poll_active = intval($poll->pollq_active);
491
+ $poll_expiry = trim($poll->pollq_expiry);
492
+ if(empty($poll_expiry)) {
493
+ $poll_expiry_text = __('No Expiry', 'wp-polls');
494
+ } else {
495
+ $poll_expiry_text = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_expiry));
496
  }
497
+ if($i%2 == 0) {
498
+ $style = 'class="alternate"';
499
+ } else {
500
+ $style = '';
501
  }
502
+ if($current_poll > 0) {
503
+ if($current_poll == $poll_id) {
504
+ $style = 'class="highlight"';
505
+ }
506
+ } elseif($current_poll == 0) {
507
+ if($poll_id == $latest_poll) {
508
+ $style = 'class="highlight"';
509
+ }
510
+ } else if(in_array($poll_id, $multiple_polls)) {
511
+ $style = 'class="highlight"';
512
+ }
513
+ echo "<tr id=\"poll-$poll_id\" $style>\n";
514
+ echo "<td><strong>$poll_id</strong></td>\n";
515
+ echo '<td>';
516
+ if($current_poll > 0) {
517
+ if($current_poll == $poll_id) {
518
+ echo '<strong>'.__('Displayed:', 'wp-polls').'</strong> ';
519
+ }
520
+ } elseif($current_poll == 0) {
521
+ if($poll_id == $latest_poll) {
522
+ echo '<strong>'.__('Displayed:', 'wp-polls').'</strong> ';
523
+ }
524
+ } else if(in_array($poll_id, $multiple_polls)) {
525
+ echo '<strong>'.__('Displayed:', 'wp-polls').'</strong> ';
526
  }
527
+ echo "$poll_question</td>\n";
528
+ echo '<td>'.number_format_i18n($poll_totalvoters)."</td>\n";
529
+ echo "<td>$poll_date</td>\n";
530
+ echo "<td>$poll_expiry_text</td>\n";
531
+ echo '<td>';
532
+ if($poll_active == 1) {
533
+ _e('Open', 'wp-polls');
534
+ } elseif($poll_active == -1) {
535
+ _e('Future', 'wp-polls');
536
+ } else {
537
+ _e('Closed', 'wp-polls');
538
  }
539
+ echo "</td>\n";
540
+ echo "<td><a href=\"$base_page&amp;mode=logs&amp;id=$poll_id\" class=\"edit\">".__('Logs', 'wp-polls')."</a></td>\n";
541
+ echo "<td><a href=\"$base_page&amp;mode=edit&amp;id=$poll_id\" class=\"edit\">".__('Edit', 'wp-polls')."</a></td>\n";
542
+ echo "<td><a href=\"#DeletePoll\" onclick=\"delete_poll($poll_id, '".sprintf(js_escape(__('You are about to delete this poll, \'%s\'.', 'wp-polls')), js_escape($poll_question))."')\" class=\"delete\">".__('Delete', 'wp-polls')."</a></td>\n";
543
+ echo '</tr>';
544
+ $i++;
545
+ $total_votes+= $poll_totalvotes;
546
+ $total_voters+= $poll_totalvoters;
547
+
 
 
 
 
 
548
  }
549
+ } else {
550
+ echo '<tr><td colspan="9" align="center"><strong>'.__('No Polls Found', 'wp-polls').'</strong></td></tr>';
 
 
 
 
 
 
 
551
  }
552
+ ?>
553
+ </tbody>
 
 
 
554
  </table>
555
  </div>
556
+ <p>&nbsp;</p>
557
+
558
  <!-- Polls Stats -->
559
  <div class="wrap">
560
+ <h2><?php _e('Polls Stats', 'wp-polls'); ?></h2>
561
+ <br style="clear" />
562
+ <table class="widefat">
563
  <tr>
564
+ <th><?php _e('Total Polls', 'wp-polls'); ?></th>
565
+ <td><?php echo $i; ?></td>
566
  </tr>
567
+ <tr class="alternate">
568
+ <th><?php _e('Total Polls\' Answers', 'wp-polls'); ?></th>
569
+ <td><?php echo number_format_i18n($total_ans); ?></td>
570
  </tr>
571
  <tr>
572
+ <th><?php _e('Total Votes Casted', 'wp-polls'); ?></th>
573
+ <td><?php echo number_format_i18n($total_votes); ?></td>
574
  </tr>
575
+ <tr class="alternate">
576
+ <th><?php _e('Total Voters', 'wp-polls'); ?></th>
577
+ <td><?php echo number_format_i18n($total_voters); ?></td>
578
  </tr>
579
  </table>
580
  </div>
581
+ <p>&nbsp;</p>
582
+
583
  <!-- Delete Polls Logs -->
584
  <div class="wrap">
585
  <h2><?php _e('Polls Logs', 'wp-polls'); ?></h2>
586
+ <br style="clear" />
587
  <div align="center" id="poll_logs">
588
  <?php
589
  $poll_ips = intval($wpdb->get_var("SELECT COUNT(pollip_id) FROM $wpdb->pollsip"));
polls-options.php ADDED
@@ -0,0 +1,395 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.5 Plugin: WP-Polls 2.30 |
6
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
+ | |
8
+ | File Written By: |
9
+ | - Lester "GaMerZ" Chan |
10
+ | - http://lesterchan.net |
11
+ | |
12
+ | File Information: |
13
+ | - Configure Poll Options |
14
+ | - wp-content/plugins/wp-polls/polls-options.php |
15
+ | |
16
+ +----------------------------------------------------------------+
17
+ */
18
+
19
+
20
+ ### Check Whether User Can Manage Polls
21
+ if(!current_user_can('manage_polls')) {
22
+ die('Access Denied');
23
+ }
24
+
25
+
26
+ ### Variables Variables Variables
27
+ $base_name = plugin_basename('wp-polls/polls-options.php');
28
+ $base_page = 'admin.php?page='.$base_name;
29
+ $id = intval($_GET['id']);
30
+
31
+
32
+ ### If Form Is Submitted
33
+ if($_POST['Submit']) {
34
+ $poll_bar_style = strip_tags(trim($_POST['poll_bar_style']));
35
+ $poll_bar_background = strip_tags(trim($_POST['poll_bar_bg']));
36
+ $poll_bar_border = strip_tags(trim($_POST['poll_bar_border']));
37
+ $poll_bar_height = intval($_POST['poll_bar_height']);
38
+ $poll_bar = array('style' => $poll_bar_style, 'background' => $poll_bar_background, 'border' => $poll_bar_border, 'height' => $poll_bar_height);
39
+ $poll_ajax_style = array('loading' => intval($_POST['poll_ajax_style_loading']), 'fading' => intval($_POST['poll_ajax_style_fading']));
40
+ $poll_ans_sortby = strip_tags(trim($_POST['poll_ans_sortby']));
41
+ $poll_ans_sortorder = strip_tags(trim($_POST['poll_ans_sortorder']));
42
+ $poll_ans_result_sortby = strip_tags(trim($_POST['poll_ans_result_sortby']));
43
+ $poll_ans_result_sortorder = strip_tags(trim($_POST['poll_ans_result_sortorder']));
44
+ $poll_archive_perpage = intval($_POST['poll_archive_perpage']);
45
+ $poll_archive_displaypoll = intval($_POST['poll_archive_displaypoll']);
46
+ $poll_archive_url = strip_tags(trim($_POST['poll_archive_url']));
47
+ $poll_archive_show = intval($_POST['poll_archive_show']);
48
+ $poll_currentpoll = intval($_POST['poll_currentpoll']);
49
+ $poll_close = intval($_POST['poll_close']);
50
+ $poll_logging_method = intval($_POST['poll_logging_method']);
51
+ $poll_cookielog_expiry = intval($_POST['poll_cookielog_expiry']);
52
+ $poll_allowtovote = intval($_POST['poll_allowtovote']);
53
+ $update_poll_queries = array();
54
+ $update_poll_text = array();
55
+ $update_poll_queries[] = update_option('poll_bar', $poll_bar);
56
+ $update_poll_queries[] = update_option('poll_ajax_style', $poll_ajax_style);
57
+ $update_poll_queries[] = update_option('poll_ans_sortby', $poll_ans_sortby);
58
+ $update_poll_queries[] = update_option('poll_ans_sortorder', $poll_ans_sortorder);
59
+ $update_poll_queries[] = update_option('poll_ans_result_sortby', $poll_ans_result_sortby);
60
+ $update_poll_queries[] = update_option('poll_ans_result_sortorder', $poll_ans_result_sortorder);
61
+ $update_poll_queries[] = update_option('poll_archive_perpage', $poll_archive_perpage);
62
+ $update_poll_queries[] = update_option('poll_archive_displaypoll', $poll_archive_displaypoll);
63
+ $update_poll_queries[] = update_option('poll_archive_url', $poll_archive_url);
64
+ $update_poll_queries[] = update_option('poll_archive_show', $poll_archive_show);
65
+ $update_poll_queries[] = update_option('poll_currentpoll', $poll_currentpoll);
66
+ $update_poll_queries[] = update_option('poll_close', $poll_close);
67
+ $update_poll_queries[] = update_option('poll_logging_method', $poll_logging_method);
68
+ $update_poll_queries[] = update_option('poll_cookielog_expiry', $poll_cookielog_expiry);
69
+ $update_poll_queries[] = update_option('poll_allowtovote', $poll_allowtovote);
70
+ $update_poll_text[] = __('Poll Bar Style', 'wp-polls');
71
+ $update_poll_text[] = __('Poll AJAX Style', 'wp-polls');
72
+ $update_poll_text[] = __('Sort Poll Answers By Option', 'wp-polls');
73
+ $update_poll_text[] = __('Sort Order Of Poll Answers Option', 'wp-polls');
74
+ $update_poll_text[] = __('Sort Poll Results By Option', 'wp-polls');
75
+ $update_poll_text[] = __('Sort Order Of Poll Results Option', 'wp-polls');
76
+ $update_poll_text[] = __('Number Of Polls Per Page To Display In Poll Archive Option', 'wp-polls');
77
+ $update_poll_text[] = __('Type Of Polls To Display In Poll Archive Option', 'wp-polls');
78
+ $update_poll_text[] = __('Poll Archive URL Option', 'wp-polls');
79
+ $update_poll_text[] = __('Show Poll Achive Link Option', 'wp-polls');
80
+ $update_poll_text[] = __('Current Active Poll Option', 'wp-polls');
81
+ $update_poll_text[] = __('Poll Close Option', 'wp-polls');
82
+ $update_poll_text[] = __('Logging Method', 'wp-polls');
83
+ $update_poll_text[] = __('Cookie And Log Expiry Option', 'wp-polls');
84
+ $update_poll_text[] = __('Allow To Vote Option', 'wp-polls');
85
+ $i=0;
86
+ $text = '';
87
+ foreach($update_poll_queries as $update_poll_query) {
88
+ if($update_poll_query) {
89
+ $text .= '<font color="green">'.$update_poll_text[$i].' '.__('Updated', 'wp-polls').'</font><br />';
90
+ }
91
+ $i++;
92
+ }
93
+ if(empty($text)) {
94
+ $text = '<font color="red">'.__('No Poll Option Updated', 'wp-polls').'</font>';
95
+ }
96
+ cron_polls_place();
97
+ }
98
+ ?>
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
+ }
118
+ }
119
+ if(pollbar_style == 'use_css') {
120
+ document.getElementById('wp-polls-pollbar').style.backgroundImage = "";
121
+ } else {
122
+ document.getElementById('wp-polls-pollbar').style.backgroundImage = "url('<?php echo get_option('siteurl'); ?>/wp-content/plugins/wp-polls/images/" + pollbar_style + "/pollbg.gif')";
123
+ }
124
+ }
125
+ document.getElementById('wp-polls-pollbar').style.backgroundColor = pollbar_background;
126
+ document.getElementById('wp-polls-pollbar').style.border = '1px solid ' + pollbar_border;
127
+ document.getElementById('wp-polls-pollbar').style.height = pollbar_height;
128
+ }
129
+ /* ]]> */
130
+ </script>
131
+ <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
132
+ <form id="poll_options_form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
133
+ <div class="wrap">
134
+ <h2><?php _e('Poll Options', 'wp-polls'); ?></h2>
135
+ <!-- Poll Bar Style -->
136
+ <h3><?php _e('Poll Bar Style', 'wp-polls'); ?></h3>
137
+ <table class="form-table">
138
+ <tr>
139
+ <th scope="row" valign="top"><?php _e('Poll Bar Style', 'wp-polls'); ?></th>
140
+ <td colspan="2">
141
+ <?php
142
+ $pollbar = get_option('poll_bar');
143
+ $pollbar_url = get_option('siteurl').'/wp-content/plugins/wp-polls/images';
144
+ $pollbar_path = ABSPATH.'/wp-content/plugins/wp-polls/images';
145
+ if($handle = @opendir($pollbar_path)) {
146
+ while (false !== ($filename = readdir($handle))) {
147
+ if ($filename != '.' && $filename != '..') {
148
+ if(is_dir($pollbar_path.'/'.$filename)) {
149
+ $pollbar_info = getimagesize($pollbar_path.'/'.$filename.'/pollbg.gif');
150
+ if($pollbar['style'] == $filename) {
151
+ echo '<input type="radio" name="poll_bar_style" value="'.$filename.'" checked="checked" onblur="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
152
+ } else {
153
+ echo '<input type="radio" name="poll_bar_style" value="'.$filename.'" onblur="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
154
+ }
155
+ echo '&nbsp;&nbsp;&nbsp;';
156
+ echo '<img src="'.$pollbar_url.'/'.$filename.'/pollbg.gif" height="'.$pollbar_info[1].'" width="100" alt="pollbg.gif" />';
157
+ echo '&nbsp;&nbsp;&nbsp;('.$filename.')';
158
+ echo '<br /><br />'."\n";
159
+ }
160
+ }
161
+ }
162
+ closedir($handle);
163
+ }
164
+ ?>
165
+ <input type="radio" name="poll_bar_style" value="use_css"<?php checked('use_css', $pollbar['style']); ?> onblur="update_pollbar('style');" /> <?php _e('Use CSS Style', 'wp-polls'); ?>
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <th scope="row" valign="top"><?php _e('Poll Bar Background', 'wp-polls'); ?></th>
170
+ <td width="10%">#<input type="text" id="poll_bar_bg" name="poll_bar_bg" value="<?php echo $pollbar['background']; ?>" size="6" maxlength="6" onblur="update_pollbar('background');" /></td>
171
+ <td><div id="wp-polls-pollbar-bg" style="background-color: #<?php echo $pollbar['background']; ?>;"></div></td>
172
+ </tr>
173
+ <tr>
174
+ <th scope="row" valign="top"><?php _e('Poll Bar Border', 'wp-polls'); ?></th>
175
+ <td width="10%">#<input type="text" id="poll_bar_border" name="poll_bar_border" value="<?php echo $pollbar['border']; ?>" size="6" maxlength="6" onblur="update_pollbar('border');" /></td>
176
+ <td><div id="wp-polls-pollbar-border" style="background-color: #<?php echo $pollbar['border']; ?>;"></div></td>
177
+ </tr>
178
+ <tr>
179
+ <th scope="row" valign="top"><?php _e('Poll Bar Height', 'wp-polls'); ?></th>
180
+ <td colspan="2"><input type="text" id="poll_bar_height" name="poll_bar_height" value="<?php echo $pollbar['height']; ?>" size="2" maxlength="2" onblur="update_pollbar('height');" />px</td>
181
+ </tr>
182
+ <tr>
183
+ <th scope="row" valign="top"><?php _e('Your poll bar will look like this', 'wp-polls'); ?></th>
184
+ <td colspan="2">
185
+ <?php
186
+ if($pollbar['style'] == 'use_css') {
187
+ echo '<div id="wp-polls-pollbar" style="width: 100px; height: '.$pollbar['height'].'px; background-color: #'.$pollbar['background'].'; border: 1px solid #'.$pollbar['border'].'"></div>'."\n";
188
+ } else {
189
+ echo '<div id="wp-polls-pollbar" style="width: 100px; height: '.$pollbar['height'].'px; background-color: #'.$pollbar['background'].'; border: 1px solid #'.$pollbar['border'].'; background-image: url(\''.get_option('siteurl').'/wp-content/plugins/wp-polls/images/'.$pollbar['style'].'/pollbg.gif\');"></div>'."\n";
190
+ }
191
+ ?>
192
+ </td>
193
+ </tr>
194
+ </table>
195
+
196
+ <!-- Polls AJAX Style -->
197
+ <?php $poll_ajax_style = get_option('poll_ajax_style'); ?>
198
+ <h3><?php _e('Polls AJAX Style', 'wp-polls'); ?></h3>
199
+ <table class="form-table">
200
+ <tr>
201
+ <th scope="row" valign="top"><?php _e('Show Loading Image With Text', 'wp-polls'); ?></th>
202
+ <td>
203
+ <select name="poll_ajax_style_loading" size="1">
204
+ <option value="0"<?php selected('0', $poll_ajax_style['loading']); ?>><?php _e('No', 'wp-polls'); ?></option>
205
+ <option value="1"<?php selected('1', $poll_ajax_style['loading']); ?>><?php _e('Yes', 'wp-polls'); ?></option>
206
+ </select>
207
+ </td>
208
+ </tr>
209
+ <tr>
210
+ <th scope="row" valign="top"><?php _e('Show Fading In And Fading Out Of Poll', 'wp-polls'); ?></th>
211
+ <td>
212
+ <select name="poll_ajax_style_fading" size="1">
213
+ <option value="0"<?php selected('0', $poll_ajax_style['fading']); ?>><?php _e('No', 'wp-polls'); ?></option>
214
+ <option value="1"<?php selected('1', $poll_ajax_style['fading']); ?>><?php _e('Yes', 'wp-polls'); ?></option>
215
+ </select>
216
+ </td>
217
+ </tr>
218
+ </table>
219
+
220
+ <!-- Sorting Of Poll Answers -->
221
+ <h3><?php _e('Sorting Of Poll Answers', 'wp-polls'); ?></h3>
222
+ <table class="form-table">
223
+ <tr>
224
+ <th scope="row" valign="top"><?php _e('Sort Poll Answers By:', 'wp-polls'); ?></th>
225
+ <td>
226
+ <select name="poll_ans_sortby" size="1">
227
+ <option value="polla_aid"<?php selected('polla_aid', get_option('poll_ans_sortby')); ?>><?php _e('Exact Order', 'wp-polls'); ?></option>
228
+ <option value="polla_answers"<?php selected('polla_answers', get_option('poll_ans_sortby')); ?>><?php _e('Alphabetical Order', 'wp-polls'); ?></option>
229
+ <option value="RAND()"<?php selected('RAND()', get_option('poll_ans_sortby')); ?>><?php _e('Random Order', 'wp-polls'); ?></option>
230
+ </select>
231
+ </td>
232
+ </tr>
233
+ <tr>
234
+ <th scope="row" valign="top"><?php _e('Sort Order Of Poll Answers:', 'wp-polls'); ?></th>
235
+ <td>
236
+ <select name="poll_ans_sortorder" size="1">
237
+ <option value="asc"<?php selected('asc', get_option('poll_ans_sortorder')); ?>><?php _e('Ascending', 'wp-polls'); ?></option>
238
+ <option value="desc"<?php selected('desc', get_option('poll_ans_sortorder')); ?>><?php _e('Descending', 'wp-polls'); ?></option>
239
+ </select>
240
+ </td>
241
+ </tr>
242
+ </table>
243
+
244
+ <!-- Sorting Of Poll Results -->
245
+ <h3><?php _e('Sorting Of Poll Results', 'wp-polls'); ?></h3>
246
+ <table class="form-table">
247
+ <tr>
248
+ <th scope="row" valign="top"><?php _e('Sort Poll Results By:', 'wp-polls'); ?></th>
249
+ <td>
250
+ <select name="poll_ans_result_sortby" size="1">
251
+ <option value="polla_votes"<?php selected('polla_votes', get_option('poll_ans_result_sortby')); ?>><?php _e('Votes', 'wp-polls'); ?></option>
252
+ <option value="polla_aid"<?php selected('polla_aid', get_option('poll_ans_result_sortby')); ?>><?php _e('Exact Order', 'wp-polls'); ?></option>
253
+ <option value="polla_answers"<?php selected('polla_answers', get_option('poll_ans_result_sortby')); ?>><?php _e('Alphabetical Order', 'wp-polls'); ?></option>
254
+ <option value="RAND()"<?php selected('RAND()', get_option('poll_ans_result_sortby')); ?>><?php _e('Random Order', 'wp-polls'); ?></option>
255
+ </select>
256
+ </td>
257
+ </tr>
258
+ <tr>
259
+ <th scope="row" valign="top"><?php _e('Sort Order Of Poll Results:', 'wp-polls'); ?></th>
260
+ <td>
261
+ <select name="poll_ans_result_sortorder" size="1">
262
+ <option value="asc"<?php selected('asc', get_option('poll_ans_result_sortorder')); ?>><?php _e('Ascending', 'wp-polls'); ?></option>
263
+ <option value="desc"<?php selected('desc', get_option('poll_ans_result_sortorder')); ?>><?php _e('Descending', 'wp-polls'); ?></option>
264
+ </select>
265
+ </td>
266
+ </tr>
267
+ </table>
268
+
269
+ <!-- Allow To Vote -->
270
+ <h3><?php _e('Allow To Vote', 'wp-polls'); ?></h3>
271
+ <table class="form-table">
272
+ <tr>
273
+ <th scope="row" valign="top"><?php _e('Who Is Allowed To Vote?', 'wp-polls'); ?></th>
274
+ <td>
275
+ <select name="poll_allowtovote" size="1">
276
+ <option value="0"<?php selected('0', get_option('poll_allowtovote')); ?>><?php _e('Guests Only', 'wp-polls'); ?></option>
277
+ <option value="1"<?php selected('1', get_option('poll_allowtovote')); ?>><?php _e('Registered Users Only', 'wp-polls'); ?></option>
278
+ <option value="2"<?php selected('2', get_option('poll_allowtovote')); ?>><?php _e('Registered Users And Guests', 'wp-polls'); ?></option>
279
+ </select>
280
+ </td>
281
+ </tr>
282
+ </table>
283
+
284
+ <!-- Logging Method -->
285
+ <h3><?php _e('Logging Method', 'wp-polls'); ?></h3>
286
+ <table class="form-table">
287
+ <tr valign="top">
288
+ <th scope="row" valign="top"><?php _e('Poll Logging Method:', 'wp-polls'); ?></th>
289
+ <td>
290
+ <select name="poll_logging_method" size="1">
291
+ <option value="0"<?php selected('0', get_option('poll_logging_method')); ?>><?php _e('Do Not Log', 'wp-polls'); ?></option>
292
+ <option value="1"<?php selected('1', get_option('poll_logging_method')); ?>><?php _e('Logged By Cookie', 'wp-polls'); ?></option>
293
+ <option value="2"<?php selected('2', get_option('poll_logging_method')); ?>><?php _e('Logged By IP', 'wp-polls'); ?></option>
294
+ <option value="3"<?php selected('3', get_option('poll_logging_method')); ?>><?php _e('Logged By Cookie And IP', 'wp-polls'); ?></option>
295
+ <option value="4"<?php selected('4', get_option('poll_logging_method')); ?>><?php _e('Logged By Username', 'wp-polls'); ?></option>
296
+ </select>
297
+ </td>
298
+ </tr>
299
+ <tr>
300
+ <th scope="row" valign="top"><?php _e('Expiry Time For Cookie And Log:', 'wp-polls'); ?></th>
301
+ <td><input type="text" name="poll_cookielog_expiry" value="<?php echo intval(get_option('poll_cookielog_expiry')); ?>" size="10" /> <?php _e('seconds (0 to disable)', 'wp-polls'); ?></td>
302
+ </tr>
303
+ </table>
304
+
305
+ <!-- Poll Archive -->
306
+ <h3><?php _e('Poll Archive', 'wp-polls'); ?></h3>
307
+ <table class="form-table">
308
+ <tr>
309
+ <th scope="row" valign="top"><?php _e('Number Of Polls Per Page:', 'wp-polls'); ?></th>
310
+ <td><input type="text" name="poll_archive_perpage" value="<?php echo intval(get_option('poll_archive_perpage')); ?>" size="2" /></td>
311
+ </tr>
312
+ <tr>
313
+ <th scope="row" valign="top"><?php _e('Type Of Polls To Display In Poll Archive:', 'wp-polls'); ?></th>
314
+ <td>
315
+ <select name="poll_archive_displaypoll" size="1">
316
+ <option value="1"<?php selected('1', get_option('poll_archive_displaypoll')); ?>><?php _e('Closed Polls Only', 'wp-polls'); ?></option>
317
+ <option value="2"<?php selected('2', get_option('poll_archive_displaypoll')); ?>><?php _e('Opened Polls Only', 'wp-polls'); ?></option>
318
+ <option value="3"<?php selected('3', get_option('poll_archive_displaypoll')); ?>><?php _e('Closed And Opened Polls', 'wp-polls'); ?></option>
319
+ </select>
320
+ </td>
321
+ </tr>
322
+ <tr>
323
+ <th scope="row" valign="top"><?php _e('Poll Archive URL:', 'wp-polls'); ?></th>
324
+ <td><input type="text" name="poll_archive_url" value="<?php echo get_option('poll_archive_url'); ?>" size="50" /></td>
325
+ </tr>
326
+ <tr>
327
+ <th scope="row" valign="top"><?php _e('Display Poll Archive Link Below Poll?', 'wp-polls'); ?></th>
328
+ <td>
329
+ <select name="poll_archive_show" size="1">
330
+ <option value="0"<?php selected('0', get_option('poll_archive_show')); ?>><?php _e('No', 'wp-polls'); ?></option>
331
+ <option value="1"<?php selected('1', get_option('poll_archive_show')); ?>><?php _e('Yes', 'wp-polls'); ?></option>
332
+ </select>
333
+ </td>
334
+ </tr>
335
+ <tr>
336
+ <th scope="row" valign="top"><?php _e('Note', 'wp-polls'); ?></th>
337
+ <td><em><?php _e('Only polls\' results will be shown in the Poll Archive regardless of whether the poll is closed or opened.', 'wp-polls'); ?></em></td>
338
+ </tr>
339
+ </table>
340
+
341
+ <!-- Current Active Poll -->
342
+ <h3><?php _e('Current Active Poll', 'wp-polls'); ?></h3>
343
+ <table class="form-table">
344
+ <tr>
345
+ <th scope="row" valign="top"><?php _e('Current Active Poll', 'wp-polls'); ?>:</th>
346
+ <td>
347
+ <select name="poll_currentpoll" size="1">
348
+ <option value="-1"<?php selected(-1, get_option('poll_currentpoll')); ?>><?php _e('Do NOT Display Poll (Disable)', 'wp-polls'); ?></option>
349
+ <option value="-2"<?php selected(-2, get_option('poll_currentpoll')); ?>><?php _e('Display Random Poll', 'wp-polls'); ?></option>
350
+ <option value="0"<?php selected(0, get_option('poll_currentpoll')); ?>><?php _e('Display Latest Poll', 'wp-polls'); ?></option>
351
+ <?php if(function_exists('dynamic_sidebar')) { ?>
352
+ <option value="-3"<?php selected(-3, get_option('poll_currentpoll')); ?>><?php _e('Display Multiple Polls', 'wp-polls'); ?></option>
353
+ <?php } ?>
354
+ <option value="0">&nbsp;</option>
355
+ <?php
356
+ $polls = $wpdb->get_results("SELECT pollq_id, pollq_question FROM $wpdb->pollsq ORDER BY pollq_id DESC");
357
+ if($polls) {
358
+ foreach($polls as $poll) {
359
+ $poll_question = stripslashes($poll->pollq_question);
360
+ $poll_id = intval($poll->pollq_id);
361
+ if($poll_id == intval(get_option('poll_currentpoll'))) {
362
+ echo "<option value=\"$poll_id\" selected=\"selected\">$poll_question</option>\n";
363
+ } else {
364
+ echo "<option value=\"$poll_id\">$poll_question</option>\n";
365
+ }
366
+ }
367
+ }
368
+ ?>
369
+ </select>
370
+ </td>
371
+ </tr>
372
+ <?php if(function_exists('dynamic_sidebar')) { ?>
373
+ <tr>
374
+ <th scope="row"valign="top"><?php _e('Note', 'wp-polls'); ?></th>
375
+ <td><em><?php _e('If you chose \'Display Multiple Polls\' for the above option, you need to configure it in Presentation -> Widgets -> Poll.', 'wp-polls'); ?></em></td>
376
+ </tr>
377
+ <?php } ?>
378
+ <tr>
379
+ <th scope="row" valign="top"><?php _e('When Poll Is Closed', 'wp-polls'); ?>:</th>
380
+ <td>
381
+ <select name="poll_close" size="1">
382
+ <option value="1"<?php selected(1, get_option('poll_close')); ?>><?php _e('Display Poll\'s Results', 'wp-polls'); ?></option>
383
+ <option value="3"<?php selected(3, get_option('poll_close')); ?>><?php _e('Display Disabled Poll\'s Voting Form', 'wp-polls'); ?></option>
384
+ <option value="2"<?php selected(2, get_option('poll_close')); ?>><?php _e('Do Not Display Poll In Post/Sidebar', 'wp-polls'); ?></option>
385
+ </select>
386
+ </td>
387
+ </tr>
388
+ </table>
389
+
390
+ <!-- Submit Button -->
391
+ <p class="submit">
392
+ <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-polls'); ?>" />
393
+ </p>
394
+ </div>
395
+ </form>
polls-templates.php ADDED
@@ -0,0 +1,495 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.5 Plugin: WP-Polls 2.30 |
6
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
+ | |
8
+ | File Written By: |
9
+ | - Lester "GaMerZ" Chan |
10
+ | - http://lesterchan.net |
11
+ | |
12
+ | File Information: |
13
+ | - Configure Poll Templates |
14
+ | - wp-content/plugins/wp-polls/polls-templates.php |
15
+ | |
16
+ +----------------------------------------------------------------+
17
+ */
18
+
19
+
20
+ ### Check Whether User Can Manage Polls
21
+ if(!current_user_can('manage_polls')) {
22
+ die('Access Denied');
23
+ }
24
+
25
+
26
+ ### Variables Variables Variables
27
+ $base_name = plugin_basename('wp-polls/polls-templates.php');
28
+ $base_page = 'admin.php?page='.$base_name;
29
+ $id = intval($_GET['id']);
30
+
31
+
32
+ ### If Form Is Submitted
33
+ if($_POST['Submit']) {
34
+ $poll_template_voteheader =trim($_POST['poll_template_voteheader']);
35
+ $poll_template_votebody = trim($_POST['poll_template_votebody']);
36
+ $poll_template_votefooter = trim($_POST['poll_template_votefooter']);
37
+ $poll_template_resultheader = trim($_POST['poll_template_resultheader']);
38
+ $poll_template_resultbody = trim($_POST['poll_template_resultbody']);
39
+ $poll_template_resultbody2 = trim($_POST['poll_template_resultbody2']);
40
+ $poll_template_resultfooter = trim($_POST['poll_template_resultfooter']);
41
+ $poll_template_resultfooter2 = trim($_POST['poll_template_resultfooter2']);
42
+ $poll_template_pollarchivelink = trim($_POST['poll_template_pollarchivelink']);
43
+ $poll_template_pollarchiveheader = trim($_POST['poll_template_pollarchiveheader']);
44
+ $poll_template_pollarchivefooter = trim($_POST['poll_template_pollarchivefooter']);
45
+ $poll_template_pollarchivepagingheader = trim($_POST['poll_template_pollarchivepagingheader']);
46
+ $poll_template_pollarchivepagingfooter = trim($_POST['poll_template_pollarchivepagingfooter']);
47
+ $poll_template_disable = trim($_POST['poll_template_disable']);
48
+ $poll_template_error = trim($_POST['poll_template_error']);
49
+ $update_poll_queries = array();
50
+ $update_poll_text = array();
51
+ $update_poll_queries[] = update_option('poll_template_voteheader', $poll_template_voteheader);
52
+ $update_poll_queries[] = update_option('poll_template_votebody', $poll_template_votebody);
53
+ $update_poll_queries[] = update_option('poll_template_votefooter', $poll_template_votefooter);
54
+ $update_poll_queries[] = update_option('poll_template_resultheader', $poll_template_resultheader);
55
+ $update_poll_queries[] = update_option('poll_template_resultbody', $poll_template_resultbody);
56
+ $update_poll_queries[] = update_option('poll_template_resultbody2', $poll_template_resultbody2);
57
+ $update_poll_queries[] = update_option('poll_template_resultfooter', $poll_template_resultfooter);
58
+ $update_poll_queries[] = update_option('poll_template_resultfooter2', $poll_template_resultfooter2);
59
+ $update_poll_queries[] = update_option('poll_template_pollarchivelink', $poll_template_pollarchivelink);
60
+ $update_poll_queries[] = update_option('poll_template_pollarchiveheader', $poll_template_pollarchiveheader);
61
+ $update_poll_queries[] = update_option('poll_template_pollarchivefooter', $poll_template_pollarchivefooter);
62
+ $update_poll_queries[] = update_option('poll_template_pollarchivepagingheader', $poll_template_pollarchivepagingheader);
63
+ $update_poll_queries[] = update_option('poll_template_pollarchivepagingfooter', $poll_template_pollarchivepagingfooter);
64
+ $update_poll_queries[] = update_option('poll_template_disable', $poll_template_disable);
65
+ $update_poll_queries[] = update_option('poll_template_error', $poll_template_error);
66
+ $update_poll_text[] = __('Voting Form Header Template', 'wp-polls');
67
+ $update_poll_text[] = __('Voting Form Body Template', 'wp-polls');
68
+ $update_poll_text[] = __('Voting Form Footer Template', 'wp-polls');
69
+ $update_poll_text[] = __('Result Header Template', 'wp-polls');
70
+ $update_poll_text[] = __('Result Body Template', 'wp-polls');
71
+ $update_poll_text[] = __('Result Body2 Template', 'wp-polls');
72
+ $update_poll_text[] = __('Result Footer Template', 'wp-polls');
73
+ $update_poll_text[] = __('Result Footer2 Template', 'wp-polls');
74
+ $update_poll_text[] = __('Poll Archive Link Template', 'wp-polls');
75
+ $update_poll_text[] = __('Poll Archive Poll Header Template', 'wp-polls');
76
+ $update_poll_text[] = __('Poll Archive Poll Footer Template', 'wp-polls');
77
+ $update_poll_text[] = __('Poll Archive Paging Header Template', 'wp-polls');
78
+ $update_poll_text[] = __('Poll Archive Paging Footer Template', 'wp-polls');
79
+ $update_poll_text[] = __('Poll Disabled Template', 'wp-polls');
80
+ $update_poll_text[] = __('Poll Error Template', 'wp-polls');
81
+ $i=0;
82
+ $text = '';
83
+ foreach($update_poll_queries as $update_poll_query) {
84
+ if($update_poll_query) {
85
+ $text .= '<font color="green">'.$update_poll_text[$i].' '.__('Updated', 'wp-polls').'</font><br />';
86
+ }
87
+ $i++;
88
+ }
89
+ if(empty($text)) {
90
+ $text = '<font color="red">'.__('No Poll Option Updated', 'wp-polls').'</font>';
91
+ }
92
+ wp_clear_scheduled_hook('polls_cron');
93
+ if (!wp_next_scheduled('polls_cron')) {
94
+ wp_schedule_event(time(), 'daily', 'polls_cron');
95
+ }
96
+ }
97
+ ?>
98
+ <script type="text/javascript">
99
+ /* <![CDATA[*/
100
+ function poll_default_templates(template) {
101
+ var default_template;
102
+ switch(template) {
103
+ case "voteheader":
104
+ default_template = "<p style=\"text-align: center;\"><strong>%POLL_QUESTION%</strong></p>\n<div id=\"polls-%POLL_ID%-ans\" class=\"wp-polls-ans\">\n<ul class=\"wp-polls-ul\">";
105
+ break;
106
+ case "votebody":
107
+ default_template = "<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>";
108
+ break;
109
+ case "votefooter":
110
+ default_template = "</ul>\n<p style=\"text-align: center;\"><input type=\"button\" name=\"vote\" value=\" <?php _e('Vote', 'wp-polls'); ?> \" class=\"Buttons\" onclick=\"poll_vote(%POLL_ID%);\" /></p>\n<p style=\"text-align: center;\"><a href=\"#ViewPollResults\" onclick=\"poll_result(%POLL_ID%); return false;\" title=\"<?php _e('View Results Of This Poll', 'wp-polls'); ?>\"><?php _e('View Results', 'wp-polls'); ?></a></p>\n</div>";
111
+ break;
112
+ case "resultheader":
113
+ default_template = "<p style=\"text-align: center;\"><strong>%POLL_QUESTION%</strong></p>\n<div id=\"polls-%POLL_ID%-ans\" class=\"wp-polls-ans\">\n<ul class=\"wp-polls-ul\">";
114
+ break;
115
+ case "resultbody":
116
+ default_template = "<li>%POLL_ANSWER% <small>(%POLL_ANSWER_PERCENTAGE%%, %POLL_ANSWER_VOTES% <?php _e('Votes', 'wp-polls'); ?>)</small><div class=\"pollbar\" style=\"width: %POLL_ANSWER_IMAGEWIDTH%%;\" title=\"%POLL_ANSWER_TEXT% (%POLL_ANSWER_PERCENTAGE%% | %POLL_ANSWER_VOTES% <?php _e('Votes', 'wp-polls'); ?>)\"></div></li>";
117
+ break;
118
+ case "resultbody2":
119
+ default_template = "<li><strong><i>%POLL_ANSWER% <small>(%POLL_ANSWER_PERCENTAGE%%, %POLL_ANSWER_VOTES% <?php _e('Votes', 'wp-polls'); ?>)</small></i></strong><div class=\"pollbar\" style=\"width: %POLL_ANSWER_IMAGEWIDTH%%;\" title=\"<?php _e('You Have Voted For This Choice', 'wp-polls'); ?> - %POLL_ANSWER_TEXT% (%POLL_ANSWER_PERCENTAGE%% | %POLL_ANSWER_VOTES% <?php _e('Votes', 'wp-polls'); ?>)\"></div></li>";
120
+ break;
121
+ case "resultfooter":
122
+ default_template = "</ul>\n<p style=\"text-align: center;\"><?php _e('Total Voters', 'wp-polls'); ?>: <strong>%POLL_TOTALVOTERS%</strong></p>\n</div>";
123
+ break;
124
+ case "resultfooter2":
125
+ default_template = "</ul>\n<p style=\"text-align: center;\"><?php _e('Total Voters', 'wp-polls'); ?>: <strong>%POLL_TOTALVOTERS%</strong></p>\n<p style=\"text-align: center;\"><a href=\"#VotePoll\" onclick=\"poll_booth(%POLL_ID%); return false;\" title=\"<?php _e('Vote For This Poll', 'wp-polls'); ?>\"><?php _e('Vote', 'wp-polls'); ?></a></p>\n</div>";
126
+ break;
127
+ case "pollarchivelink":
128
+ default_template = "<ul>\n<li><a href=\"%POLL_ARCHIVE_URL%\"><?php _e('Polls Archive', 'wp-polls'); ?></a></li>\n</ul>";
129
+ break;
130
+ case "pollarchiveheader":
131
+ default_template = "";
132
+ break;
133
+ case "pollarchivefooter":
134
+ default_template = "<p><?php _e('Start Date:', 'wp-polls'); ?> %POLL_START_DATE%<br /><?php _e('End Date:', 'wp-polls'); ?> %POLL_END_DATE%</p>";
135
+ break;
136
+ case "pollarchivepagingheader":
137
+ default_template = "";
138
+ break;
139
+ case "pollarchivepagingfooter":
140
+ default_template = "";
141
+ break;
142
+ case "disable":
143
+ default_template = "<?php _e('Sorry, there are no polls available at the moment.', 'wp-polls'); ?>";
144
+ break;
145
+ case "error":
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
+ <h2><?php _e('Poll Templates', 'wp-polls'); ?></h2>
157
+ <!-- Template Variables -->
158
+ <h3><?php _e('Template Variables', 'wp-polls'); ?></h3>
159
+ <table class="widefat">
160
+ <tr>
161
+ <td>
162
+ <strong>%POLL_ID%</strong><br />
163
+ <?php _e('Display the poll\'s ID', 'wp-polls'); ?>
164
+ </td>
165
+ <td>
166
+ <strong>%POLL_ANSWER_ID%</strong><br />
167
+ <?php _e('Display the poll\'s answer ID', 'wp-polls'); ?>
168
+ </td>
169
+ </tr>
170
+ <tr class="alternate">
171
+ <td>
172
+ <strong>%POLL_QUESTION%</strong><br />
173
+ <?php _e('Display the poll\'s question', 'wp-polls'); ?>
174
+ </td>
175
+ <td>
176
+ <strong>%POLL_ANSWER%</strong><br />
177
+ <?php _e('Display the poll\'s answer', 'wp-polls'); ?>
178
+ </td>
179
+ </tr>
180
+ <tr>
181
+ <td>
182
+ <strong>%POLL_TOTALVOTES%</strong><br />
183
+ <?php _e('Display the poll\'s total votes NOT the number of people who voted for the poll', 'wp-polls'); ?>
184
+ </td>
185
+ <td>
186
+ <strong>%POLL_ANSWER_TEXT%</strong><br />
187
+ <?php _e('Display the poll\'s answer without HTML formatting.', 'wp-polls'); ?>
188
+ </td>
189
+ </tr>
190
+ <tr class="alternate">
191
+ <td>
192
+ <strong>%POLL_RESULT_URL%</strong><br />
193
+ <?php _e('Displays URL to poll\'s result', 'wp-polls'); ?>
194
+ </td>
195
+ <td>
196
+ <strong>%POLL_ANSWER_VOTES%</strong><br />
197
+ <?php _e('Display the poll\'s answer votes', 'wp-polls'); ?>
198
+ </td>
199
+ </tr>
200
+ <tr>
201
+ <td>
202
+ <strong>%POLL_MOST_ANSWER%</strong><br />
203
+ <?php _e('Display the poll\'s most voted answer', 'wp-polls'); ?>
204
+ </td>
205
+ <td>
206
+ <strong>%POLL_ANSWER_PERCENTAGE%</strong><br />
207
+ <?php _e('Display the poll\'s answer percentage', 'wp-polls'); ?>
208
+ </td>
209
+ </tr>
210
+ <tr class="alternate">
211
+ <td>
212
+ <strong>%POLL_MOST_VOTES%</strong><br />
213
+ <?php _e('Display the poll\'s answer votes for the most voted answer', 'wp-polls'); ?>
214
+ </td>
215
+ <td>
216
+ <strong>%POLL_ANSWER_IMAGEWIDTH%</strong><br />
217
+ <?php _e('Display the poll\'s answer image width', 'wp-polls'); ?>
218
+ </td>
219
+ </tr>
220
+ <tr>
221
+ <td>
222
+ <strong>%POLL_MOST_PERCENTAGE%</strong><br />
223
+ <?php _e('Display the poll\'s answer percentage for the most voted answer', 'wp-polls'); ?>
224
+ </td>
225
+ <td>
226
+ <strong>%POLL_LEAST_ANSWER%</strong><br />
227
+ <?php _e('Display the poll\'s least voted answer', 'wp-polls'); ?>
228
+ </td>
229
+ </tr>
230
+ <tr class="alternate">
231
+ <td>
232
+ <strong>%POLL_START_DATE%</strong><br />
233
+ <?php _e('Display the poll\'s start date/time', 'wp-polls'); ?>
234
+ </td>
235
+ <td>
236
+ <strong>%POLL_LEAST_VOTES%</strong><br />
237
+ <?php _e('Display the poll\'s answer votes for the least voted answer', 'wp-polls'); ?>
238
+ </td>
239
+ </tr>
240
+ <tr>
241
+ <td>
242
+ <strong>%POLL_END_DATE%</strong><br />
243
+ <?php _e('Display the poll\'s end date/time', 'wp-polls'); ?>
244
+ </td>
245
+ <td>
246
+ <strong>%POLL_LEAST_PERCENTAGE%</strong><br />
247
+ <?php _e('Display the poll\'s answer percentage for the least voted answer', 'wp-polls'); ?>
248
+ </td>
249
+ </tr>
250
+ <tr class="alternate">
251
+ <td>
252
+ <strong>%POLL_MULTIPLE_ANS_MAX%</strong><br />
253
+ <?php _e('Display the the maximum number of answers the user can choose if the poll supports multiple answers', 'wp-polls'); ?>
254
+ </td>
255
+ <td>
256
+ <strong>%POLL_CHECKBOX_RADIO%</strong><br />
257
+ <?php _e('Display "checkbox" or "radio" input types depending on the poll type', 'wp-polls'); ?>
258
+ </td>
259
+ </tr>
260
+ <tr>
261
+ <td>
262
+ <strong>%POLL_TOTALVOTERS%</strong><br />
263
+ <?php _e('Display the number of people who voted for the poll NOT the total votes of the poll', 'wp-polls'); ?>
264
+ </td>
265
+ <td>
266
+ <strong>%POLL_ARCHIVE_URL%</strong><br />
267
+ <?php _e('Display the poll archive URL', 'wp-polls'); ?>
268
+ </td>
269
+ </tr>
270
+ <tr class="alternate">
271
+ <td colspan="2">
272
+ <?php _e('Note: <strong>%POLL_TOTALVOTES%</strong> and <strong>%POLL_TOTALVOTERS%</strong> will be different if your poll supports multiple answers. If your poll allows only single answer, both value will be the same.', 'wp-polls'); ?>
273
+ </td>
274
+ </tr>
275
+ </table>
276
+
277
+ <!-- Poll Voting Form Templates -->
278
+ <h3><?php _e('Poll Voting Form Templates', 'wp-polls'); ?></h3>
279
+ <table class="form-table">
280
+ <tr>
281
+ <td width="30%" align="left">
282
+ <strong><?php _e('Voting Form Header:', 'wp-polls'); ?></strong><br /><br /><br />
283
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
284
+ - %POLL_ID%<br />
285
+ - %POLL_QUESTION%<br />
286
+ - %POLL_START_DATE%<br />
287
+ - %POLL_END_DATE%<br />
288
+ - %POLL_TOTALVOTES%<br />
289
+ - %POLL_TOTALVOTERS%<br />
290
+ - %POLL_MULTIPLE_ANS_MAX%<br /><br />
291
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('voteheader');" class="button" />
292
+ </td>
293
+ <td><textarea cols="80" rows="15" id="poll_template_voteheader" name="poll_template_voteheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_voteheader'))); ?></textarea></td>
294
+ </tr>
295
+ <tr>
296
+ <td width="30%" align="left">
297
+ <strong><?php _e('Voting Form Body:', 'wp-polls'); ?></strong><br /><br /><br />
298
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
299
+ - %POLL_ID%<br />
300
+ - %POLL_ANSWER_ID%<br />
301
+ - %POLL_ANSWER%<br />
302
+ - %POLL_ANSWER_VOTES%<br />
303
+ - %POLL_CHECKBOX_RADIO%<br /><br />
304
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('votebody');" class="button" />
305
+ </td>
306
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_votebody" name="poll_template_votebody"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_votebody'))); ?></textarea></td>
307
+ </tr>
308
+ <tr>
309
+ <td width="30%" align="left">
310
+ <strong><?php _e('Voting Form Footer:', 'wp-polls'); ?></strong><br /><br /><br />
311
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
312
+ - %POLL_ID%<br />
313
+ - %POLL_RESULT_URL%<br />
314
+ - %POLL_MULTIPLE_ANS_MAX%<br /><br />
315
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('votefooter');" class="button" />
316
+ </td>
317
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_votefooter" name="poll_template_votefooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_votefooter'))); ?></textarea></td>
318
+ </tr>
319
+ </table>
320
+
321
+ <!-- Poll Result Templates -->
322
+ <h3><?php _e('Poll Result Templates', 'wp-polls'); ?></h3>
323
+ <table class="form-table">
324
+ <tr>
325
+ <td width="30%" align="left">
326
+ <strong><?php _e('Result Header:', 'wp-polls'); ?></strong><br /><br /><br />
327
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
328
+ - %POLL_ID%<br />
329
+ - %POLL_QUESTION%<br />
330
+ - %POLL_START_DATE%<br />
331
+ - %POLL_END_DATE%<br />
332
+ - %POLL_TOTALVOTES%<br />
333
+ - %POLL_TOTALVOTERS%<br />
334
+ - %POLL_MULTIPLE_ANS_MAX%<br /><br />
335
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultheader');" class="button" />
336
+ </td>
337
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_resultheader" name="poll_template_resultheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultheader'))); ?></textarea></td>
338
+ </tr>
339
+ <tr>
340
+ <td width="30%" align="left">
341
+ <strong><?php _e('Result Body:', 'wp-polls'); ?></strong><br /><?php _e('Displayed When The User HAS NOT Voted', 'wp-polls'); ?><br /><br />
342
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
343
+ - %POLL_ANSWER_ID%<br />
344
+ - %POLL_ANSWER%<br />
345
+ - %POLL_ANSWER_TEXT%<br />
346
+ - %POLL_ANSWER_VOTES%<br />
347
+ - %POLL_ANSWER_PERCENTAGE%<br />
348
+ - %POLL_ANSWER_IMAGEWIDTH%<br /><br />
349
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultbody');" class="button" />
350
+ </td>
351
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_resultbody" name="poll_template_resultbody"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultbody'))); ?></textarea></td>
352
+ </tr>
353
+ <tr>
354
+ <td width="30%" align="left">
355
+ <strong><?php _e('Result Body:', 'wp-polls'); ?></strong><br /><?php _e('Displayed When The User HAS Voted', 'wp-polls'); ?><br /><br />
356
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
357
+ - %POLL_ANSWER_ID%<br />
358
+ - %POLL_ANSWER%<br />
359
+ - %POLL_ANSWER_TEXT%<br />
360
+ - %POLL_ANSWER_VOTES%<br />
361
+ - %POLL_ANSWER_PERCENTAGE%<br />
362
+ - %POLL_ANSWER_IMAGEWIDTH%<br /><br />
363
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultbody2');" class="button" />
364
+ </td>
365
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_resultbody2" name="poll_template_resultbody2"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultbody2'))); ?></textarea></td>
366
+ </tr>
367
+ <tr>
368
+ <td width="30%" align="left">
369
+ <strong><?php _e('Result Footer:', 'wp-polls'); ?></strong><br /><?php _e('Displayed When The User HAS Voted', 'wp-polls'); ?><br /><br />
370
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
371
+ - %POLL_ID%<br />
372
+ - %POLL_START_DATE%<br />
373
+ - %POLL_END_DATE%<br />
374
+ - %POLL_TOTALVOTES%<br />
375
+ - %POLL_TOTALVOTERS%<br />
376
+ - %POLL_MOST_ANSWER%<br />
377
+ - %POLL_MOST_VOTES%<br />
378
+ - %POLL_MOST_PERCENTAGE%<br />
379
+ - %POLL_LEAST_ANSWER%<br />
380
+ - %POLL_LEAST_VOTES%<br />
381
+ - %POLL_LEAST_PERCENTAGE%<br />
382
+ - %POLL_MULTIPLE_ANS_MAX%<br /><br />
383
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultfooter');" class="button" />
384
+ </td>
385
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_resultfooter" name="poll_template_resultfooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultfooter'))); ?></textarea></td>
386
+ </tr>
387
+ <tr>
388
+ <td width="30%" align="left">
389
+ <strong><?php _e('Result Footer:', 'wp-polls'); ?></strong><br /><?php _e('Displayed When The User HAS NOT Voted', 'wp-polls'); ?><br /><br />
390
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
391
+ - %POLL_ID%<br />
392
+ - %POLL_START_DATE%<br />
393
+ - %POLL_END_DATE%<br />
394
+ - %POLL_TOTALVOTES%<br />
395
+ - %POLL_TOTALVOTERS%<br />
396
+ - %POLL_MOST_ANSWER%<br />
397
+ - %POLL_MOST_VOTES%<br />
398
+ - %POLL_MOST_PERCENTAGE%<br />
399
+ - %POLL_LEAST_ANSWER%<br />
400
+ - %POLL_LEAST_VOTES%<br />
401
+ - %POLL_LEAST_PERCENTAGE%<br />
402
+ - %POLL_MULTIPLE_ANS_MAX%<br /><br />
403
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultfooter2');" class="button" />
404
+ </td>
405
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_resultfooter2" name="poll_template_resultfooter2"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultfooter2'))); ?></textarea></td>
406
+ </tr>
407
+ </table>
408
+
409
+ <!-- Poll Archive Templates -->
410
+ <h3><?php _e('Poll Archive Templates', 'wp-polls'); ?></h3>
411
+ <table class="form-table">
412
+ <tr>
413
+ <td width="30%" align="left">
414
+ <strong><?php _e('Poll Archive Link', 'wp-polls'); ?></strong><br /><?php _e('Template For Displaying Poll Archive Link', 'wp-polls'); ?><br /><br />
415
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
416
+ - %POLL_ARCHIVE_URL%<br /><br />
417
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivelink');" class="button" />
418
+ </td>
419
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_pollarchivelink" name="poll_template_pollarchivelink"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchivelink'))); ?></textarea></td>
420
+ </tr>
421
+ <tr>
422
+ <td width="30%" align="left">
423
+ <strong><?php _e('Individual Poll Header', 'wp-polls'); ?></strong><br /><?php _e('Displayed Before Each Poll In The Poll Archive', 'wp-polls'); ?><br /><br />
424
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
425
+ - <?php _e('N/A', 'wp-polls'); ?><br /><br />
426
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchiveheader');" class="button" />
427
+ </td>
428
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_pollarchiveheader" name="poll_template_pollarchiveheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchiveheader'))); ?></textarea></td>
429
+ </tr>
430
+ <tr>
431
+ <td width="30%" align="left">
432
+ <strong><?php _e('Individual Poll Footer', 'wp-polls'); ?></strong><br /><?php _e('Displayed After Each Poll In The Poll Archive', 'wp-polls'); ?><br /><br />
433
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
434
+ - %POLL_START_DATE%<br />
435
+ - %POLL_END_DATE%<br />
436
+ - %POLL_TOTALVOTES%<br />
437
+ - %POLL_TOTALVOTERS%<br />
438
+ - %POLL_MOST_ANSWER%<br />
439
+ - %POLL_MOST_VOTES%<br />
440
+ - %POLL_MOST_PERCENTAGE%<br />
441
+ - %POLL_LEAST_ANSWER%<br />
442
+ - %POLL_LEAST_VOTES%<br />
443
+ - %POLL_LEAST_PERCENTAGE%<br />
444
+ - %POLL_MULTIPLE_ANS_MAX%<br /><br />
445
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivefooter');" class="button" />
446
+ </td>
447
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_pollarchivefooter" name="poll_template_pollarchivefooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchivefooter'))); ?></textarea></td>
448
+ </tr>
449
+ <tr>
450
+ <td width="30%" align="left">
451
+ <strong><?php _e('Paging Header', 'wp-polls'); ?></strong><br /><?php _e('Displayed Before Paging In The Poll Archive', 'wp-polls'); ?><br /><br />
452
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
453
+ - <?php _e('N/A', 'wp-polls'); ?><br />
454
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivepagingheader');" class="button" />
455
+ </td>
456
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_pollarchivepagingheader" name="poll_template_pollarchivepagingheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchivepagingheader'))); ?></textarea></td>
457
+ </tr>
458
+ <tr>
459
+ <td width="30%" align="left">
460
+ <strong><?php _e('Paging Footer', 'wp-polls'); ?></strong><br /><?php _e('Displayed After Paging In The Poll Archive', 'wp-polls'); ?><br /><br />
461
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
462
+ - <?php _e('N/A', 'wp-polls'); ?><br />
463
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivepagingfooter');" class="button" />
464
+ </td>
465
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_pollarchivepagingfooter" name="poll_template_pollarchivepagingfooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchivepagingfooter'))); ?></textarea></td>
466
+ </tr>
467
+ </table>
468
+
469
+ <!-- Poll Misc Templates -->
470
+ <h3><?php _e('Poll Misc Templates', 'wp-polls'); ?></h3>
471
+ <table class="form-table">
472
+ <tr>
473
+ <td width="30%" align="left">
474
+ <strong><?php _e('Poll Disabled', 'wp-polls'); ?></strong><br /><?php _e('Displayed When The Poll Is Disabled', 'wp-polls'); ?><br /><br />
475
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
476
+ - <?php _e('N/A', 'wp-polls'); ?><br /><br />
477
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('disable');" class="button" />
478
+ </td>
479
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_disable" name="poll_template_disable"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_disable'))); ?></textarea></td>
480
+ </tr>
481
+ <tr>
482
+ <td width="30%" align="left">
483
+ <strong><?php _e('Poll Error', 'wp-polls'); ?></strong><br /><?php _e('Displayed When An Error Has Occured While Processing The Poll', 'wp-polls'); ?><br /><br />
484
+ <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
485
+ - <?php _e('N/A', 'wp-polls'); ?><br /><br />
486
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('error');" class="button" />
487
+ </td>
488
+ <td align="left"><textarea cols="80" rows="15" id="poll_template_error" name="poll_template_error"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_error'))); ?></textarea></td>
489
+ </tr>
490
+ </table>
491
+ <p class="submit">
492
+ <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-polls'); ?>" />
493
+ </p>
494
+ </div>
495
+ </form>
polls/polls-uninstall.php → polls-uninstall.php RENAMED
@@ -2,8 +2,8 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.1 Plugin: WP-Polls 2.21 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -11,7 +11,7 @@
11
  | |
12
  | File Information: |
13
  | - Uninstall WP-Polls |
14
- | - wp-content/plugins/polls/polls-uninstall.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
@@ -24,11 +24,11 @@ if(!current_user_can('manage_polls')) {
24
 
25
 
26
  ### Variables Variables Variables
27
- $base_name = plugin_basename('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');
32
 
33
 
34
  ### Form Processing
@@ -73,9 +73,9 @@ if(!empty($_POST['do'])) {
73
  switch($mode) {
74
  // Deactivating WP-Polls (By: Philippe Corbes)
75
  case 'end-UNINSTALL':
76
- $deactivate_url = 'plugins.php?action=deactivate&amp;plugin=polls/polls.php';
77
  if(function_exists('wp_nonce_url')) {
78
- $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_polls/polls.php');
79
  }
80
  echo '<div class="wrap">';
81
  echo '<h2>'.__('Uninstall WP-Polls', 'wp-polls').'</h2>';
@@ -99,13 +99,15 @@ switch($mode) {
99
  <p style="text-align: left; color: red">
100
  <strong><?php _e('The following WordPress Options/Tables will be DELETED:', 'wp-polls'); ?></strong><br />
101
  </p>
102
- <table width="50%" border="0" cellspacing="3" cellpadding="3">
103
- <tr class="thead">
104
- <td align="center"><strong><?php _e('WordPress Options', 'wp-polls'); ?></strong></td>
105
- <td align="center"><strong><?php _e('WordPress Tables', 'wp-polls'); ?></strong></td>
106
- </tr>
 
 
107
  <tr>
108
- <td valign="top" style="background-color: #eee;">
109
  <ol>
110
  <?php
111
  foreach($polls_settings as $settings) {
@@ -114,7 +116,7 @@ switch($mode) {
114
  ?>
115
  </ol>
116
  </td>
117
- <td valign="top" style="background-color: #eee;">
118
  <ol>
119
  <?php
120
  foreach($polls_tables as $tables) {
@@ -125,8 +127,8 @@ switch($mode) {
125
  </td>
126
  </tr>
127
  </table>
128
- <p>&nbsp;</p>
129
  <p style="text-align: center;">
 
130
  <input type="checkbox" name="uninstall_poll_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-polls'); ?><br /><br />
131
  <input type="submit" name="do" value="<?php _e('UNINSTALL WP-Polls', 'wp-polls'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-Polls From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-polls'); ?>')" />
132
  </p>
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.5 Plugin: WP-Polls 2.30 |
6
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
11
  | |
12
  | File Information: |
13
  | - Uninstall WP-Polls |
14
+ | - wp-content/plugins/wp-polls/polls-uninstall.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
24
 
25
 
26
  ### Variables Variables Variables
27
+ $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
73
  switch($mode) {
74
  // Deactivating WP-Polls (By: Philippe Corbes)
75
  case 'end-UNINSTALL':
76
+ $deactivate_url = 'plugins.php?action=deactivate&amp;plugin=wp-polls/wp-polls.php';
77
  if(function_exists('wp_nonce_url')) {
78
+ $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_wp-polls/wp-polls.php');
79
  }
80
  echo '<div class="wrap">';
81
  echo '<h2>'.__('Uninstall WP-Polls', 'wp-polls').'</h2>';
99
  <p style="text-align: left; color: red">
100
  <strong><?php _e('The following WordPress Options/Tables will be DELETED:', 'wp-polls'); ?></strong><br />
101
  </p>
102
+ <table class="widefat">
103
+ <thead>
104
+ <tr>
105
+ <th><?php _e('WordPress Options', 'wp-polls'); ?></th>
106
+ <th><?php _e('WordPress Tables', 'wp-polls'); ?></th>
107
+ </tr>
108
+ </thead>
109
  <tr>
110
+ <td valign="top">
111
  <ol>
112
  <?php
113
  foreach($polls_settings as $settings) {
116
  ?>
117
  </ol>
118
  </td>
119
+ <td valign="top" class="alternate">
120
  <ol>
121
  <?php
122
  foreach($polls_tables as $tables) {
127
  </td>
128
  </tr>
129
  </table>
 
130
  <p style="text-align: center;">
131
+ <?php _e('Do you really want to uninstall WP-Polls?', 'wp-polls'); ?><br /><br />
132
  <input type="checkbox" name="uninstall_poll_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-polls'); ?><br /><br />
133
  <input type="submit" name="do" value="<?php _e('UNINSTALL WP-Polls', 'wp-polls'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-Polls From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-polls'); ?>')" />
134
  </p>
polls/polls-options.php DELETED
@@ -1,384 +0,0 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.1 Plugin: WP-Polls 2.21 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Configure Poll Options |
14
- | - wp-content/plugins/polls/polls-options.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Check Whether User Can Manage Polls
21
- if(!current_user_can('manage_polls')) {
22
- die('Access Denied');
23
- }
24
-
25
-
26
- ### Variables Variables Variables
27
- $base_name = plugin_basename('polls/polls-options.php');
28
- $base_page = 'admin.php?page='.$base_name;
29
- $id = intval($_GET['id']);
30
-
31
-
32
- ### If Form Is Submitted
33
- if($_POST['Submit']) {
34
- $poll_bar_style = strip_tags(trim($_POST['poll_bar_style']));
35
- $poll_bar_background = strip_tags(trim($_POST['poll_bar_bg']));
36
- $poll_bar_border = strip_tags(trim($_POST['poll_bar_border']));
37
- $poll_bar_height = intval($_POST['poll_bar_height']);
38
- $poll_bar = array('style' => $poll_bar_style, 'background' => $poll_bar_background, 'border' => $poll_bar_border, 'height' => $poll_bar_height);
39
- $poll_ajax_style = array('loading' => intval($_POST['poll_ajax_style_loading']), 'fading' => intval($_POST['poll_ajax_style_fading']));
40
- $poll_ans_sortby = strip_tags(trim($_POST['poll_ans_sortby']));
41
- $poll_ans_sortorder = strip_tags(trim($_POST['poll_ans_sortorder']));
42
- $poll_ans_result_sortby = strip_tags(trim($_POST['poll_ans_result_sortby']));
43
- $poll_ans_result_sortorder = strip_tags(trim($_POST['poll_ans_result_sortorder']));
44
- $poll_archive_perpage = intval($_POST['poll_archive_perpage']);
45
- $poll_archive_displaypoll = intval($_POST['poll_archive_displaypoll']);
46
- $poll_archive_url = strip_tags(trim($_POST['poll_archive_url']));
47
- $poll_archive_show = intval($_POST['poll_archive_show']);
48
- $poll_currentpoll = intval($_POST['poll_currentpoll']);
49
- $poll_close = intval($_POST['poll_close']);
50
- $poll_logging_method = intval($_POST['poll_logging_method']);
51
- $poll_allowtovote = intval($_POST['poll_allowtovote']);
52
- $update_poll_queries = array();
53
- $update_poll_text = array();
54
- $update_poll_queries[] = update_option('poll_bar', $poll_bar);
55
- $update_poll_queries[] = update_option('poll_ajax_style', $poll_ajax_style);
56
- $update_poll_queries[] = update_option('poll_ans_sortby', $poll_ans_sortby);
57
- $update_poll_queries[] = update_option('poll_ans_sortorder', $poll_ans_sortorder);
58
- $update_poll_queries[] = update_option('poll_ans_result_sortby', $poll_ans_result_sortby);
59
- $update_poll_queries[] = update_option('poll_ans_result_sortorder', $poll_ans_result_sortorder);
60
- $update_poll_queries[] = update_option('poll_archive_perpage', $poll_archive_perpage);
61
- $update_poll_queries[] = update_option('poll_archive_displaypoll', $poll_archive_displaypoll);
62
- $update_poll_queries[] = update_option('poll_archive_url', $poll_archive_url);
63
- $update_poll_queries[] = update_option('poll_archive_show', $poll_archive_show);
64
- $update_poll_queries[] = update_option('poll_currentpoll', $poll_currentpoll);
65
- $update_poll_queries[] = update_option('poll_close', $poll_close);
66
- $update_poll_queries[] = update_option('poll_logging_method', $poll_logging_method);
67
- $update_poll_queries[] = update_option('poll_allowtovote', $poll_allowtovote);
68
- $update_poll_text[] = __('Poll Bar Style', 'wp-polls');
69
- $update_poll_text[] = __('Poll AJAX Style', 'wp-polls');
70
- $update_poll_text[] = __('Sort Poll Answers By Option', 'wp-polls');
71
- $update_poll_text[] = __('Sort Order Of Poll Answers Option', 'wp-polls');
72
- $update_poll_text[] = __('Sort Poll Results By Option', 'wp-polls');
73
- $update_poll_text[] = __('Sort Order Of Poll Results Option', 'wp-polls');
74
- $update_poll_text[] = __('Number Of Polls Per Page To Display In Poll Archive Option', 'wp-polls');
75
- $update_poll_text[] = __('Type Of Polls To Display In Poll Archive Option', 'wp-polls');
76
- $update_poll_text[] = __('Poll Archive URL Option', 'wp-polls');
77
- $update_poll_text[] = __('Show Poll Achive Link Option', 'wp-polls');
78
- $update_poll_text[] = __('Current Active Poll Option', 'wp-polls');
79
- $update_poll_text[] = __('Poll Close Option', 'wp-polls');
80
- $update_poll_text[] = __('Logging Method', 'wp-polls');
81
- $update_poll_text[] = __('Allow To Vote Option', 'wp-polls');
82
- $i=0;
83
- $text = '';
84
- foreach($update_poll_queries as $update_poll_query) {
85
- if($update_poll_query) {
86
- $text .= '<font color="green">'.$update_poll_text[$i].' '.__('Updated', 'wp-polls').'</font><br />';
87
- }
88
- $i++;
89
- }
90
- if(empty($text)) {
91
- $text = '<font color="red">'.__('No Poll Option Updated', 'wp-polls').'</font>';
92
- }
93
- cron_polls_place();
94
- }
95
- ?>
96
- <script type="text/javascript">
97
- /* <![CDATA[*/
98
- function set_pollbar_height(height) {
99
- document.getElementById('poll_bar_height').value = height;
100
- }
101
- function update_pollbar(where) {
102
- pollbar_background = '#' + document.getElementById('poll_bar_bg').value;
103
- pollbar_border = '#' + document.getElementById('poll_bar_border').value;
104
- pollbar_height = document.getElementById('poll_bar_height').value + 'px';
105
- if(where == 'background') {
106
- document.getElementById('wp-polls-pollbar-bg').style.backgroundColor = pollbar_background;
107
- } else if(where == 'border') {
108
- document.getElementById('wp-polls-pollbar-border').style.backgroundColor = pollbar_border;
109
- } else if(where == 'style') {
110
- pollbar_style_options = document.getElementById('poll_options_form').poll_bar_style;
111
- for(i = 0; i < pollbar_style_options.length; i++) {
112
- if(pollbar_style_options[i].checked) {
113
- pollbar_style = pollbar_style_options[i].value;
114
- }
115
- }
116
- if(pollbar_style == 'use_css') {
117
- document.getElementById('wp-polls-pollbar').style.backgroundImage = "";
118
- } else {
119
- document.getElementById('wp-polls-pollbar').style.backgroundImage = "url('<?php echo get_option('siteurl'); ?>/wp-content/plugins/polls/images/" + pollbar_style + "/pollbg.gif')";
120
- }
121
- }
122
- document.getElementById('wp-polls-pollbar').style.backgroundColor = pollbar_background;
123
- document.getElementById('wp-polls-pollbar').style.border = '1px solid ' + pollbar_border;
124
- document.getElementById('wp-polls-pollbar').style.height = pollbar_height;
125
- }
126
- /* ]]> */
127
- </script>
128
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
129
- <form id="poll_options_form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
130
- <div class="wrap">
131
- <h2><?php _e('Poll Options', 'wp-polls'); ?></h2>
132
- <fieldset class="options">
133
- <legend><?php _e('Poll Bar Style', 'wp-polls'); ?></legend>
134
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
135
- <tr valign="top">
136
- <th align="left" width="20%"><?php _e('Poll Bar Style', 'wp-polls'); ?></th>
137
- <td align="left" colspan="2">
138
- <?php
139
- $pollbar = get_option('poll_bar');
140
- $pollbar_url = get_option('siteurl').'/wp-content/plugins/polls/images';
141
- $pollbar_path = ABSPATH.'/wp-content/plugins/polls/images';
142
- if($handle = @opendir($pollbar_path)) {
143
- while (false !== ($filename = readdir($handle))) {
144
- if ($filename != '.' && $filename != '..') {
145
- if(is_dir($pollbar_path.'/'.$filename)) {
146
- $pollbar_info = getimagesize($pollbar_path.'/'.$filename.'/pollbg.gif');
147
- if($pollbar['style'] == $filename) {
148
- echo '<input type="radio" name="poll_bar_style" value="'.$filename.'" checked="checked" onblur="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
149
- } else {
150
- echo '<input type="radio" name="poll_bar_style" value="'.$filename.'" onblur="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
151
- }
152
- echo '&nbsp;&nbsp;&nbsp;';
153
- echo '<img src="'.$pollbar_url.'/'.$filename.'/pollbg.gif" height="'.$pollbar_info[1].'" width="100" alt="pollbg.gif" />';
154
- echo '&nbsp;&nbsp;&nbsp;('.$filename.')';
155
- echo '<br /><br />'."\n";
156
- }
157
- }
158
- }
159
- closedir($handle);
160
- }
161
- ?>
162
- <input type="radio" name="poll_bar_style" value="use_css"<?php checked('use_css', $pollbar['style']); ?> onblur="update_pollbar('style');" /> <?php _e('Use CSS Style', 'wp-polls'); ?>
163
- </td>
164
- </tr>
165
- <tr valign="top">
166
- <th align="left" width="20%"><?php _e('Poll Bar Background', 'wp-polls'); ?></th>
167
- <td align="left" width="10%">#<input type="text" id="poll_bar_bg" name="poll_bar_bg" value="<?php echo $pollbar['background']; ?>" size="6" maxlength="6" onblur="update_pollbar('background');" /></td>
168
- <td align="left"><div id="wp-polls-pollbar-bg" style="background-color: #<?php echo $pollbar['background']; ?>;"></div></td>
169
- </tr>
170
- <tr valign="top">
171
- <th align="left" width="20%"><?php _e('Poll Bar Border', 'wp-polls'); ?></th>
172
- <td align="left" width="10%">#<input type="text" id="poll_bar_border" name="poll_bar_border" value="<?php echo $pollbar['border']; ?>" size="6" maxlength="6" onblur="update_pollbar('border');" /></td>
173
- <td align="left"><div id="wp-polls-pollbar-border" style="background-color: #<?php echo $pollbar['border']; ?>;"></div></td>
174
- </tr>
175
- <tr valign="top">
176
- <th align="left" width="20%"><?php _e('Poll Bar Height', 'wp-polls'); ?></th>
177
- <td align="left" colspan="2"><input type="text" id="poll_bar_height" name="poll_bar_height" value="<?php echo $pollbar['height']; ?>" size="2" maxlength="2" onblur="update_pollbar('height');" />px</td>
178
- </tr>
179
- <tr valign="top">
180
- <th align="left" width="20%"><?php _e('Your poll bar will look like this', 'wp-polls'); ?></th>
181
- <td align="left" >
182
- <?php
183
- if($pollbar['style'] == 'use_css') {
184
- echo '<div id="wp-polls-pollbar" style="width: 100px; height: '.$pollbar['height'].'px; background-color: #'.$pollbar['background'].'; border: 1px solid #'.$pollbar['border'].'"></div>'."\n";
185
- } else {
186
- echo '<div id="wp-polls-pollbar" style="width: 100px; height: '.$pollbar['height'].'px; background-color: #'.$pollbar['background'].'; border: 1px solid #'.$pollbar['border'].'; background-image: url(\''.get_option('siteurl').'/wp-content/plugins/polls/images/'.$pollbar['style'].'/pollbg.gif\');"></div>'."\n";
187
- }
188
- ?>
189
- </td>
190
- </tr>
191
- </table>
192
- </fieldset>
193
- <?php $poll_ajax_style = get_option('poll_ajax_style'); ?>
194
- <fieldset class="options">
195
- <legend><?php _e('Polls AJAX Style', 'wp-polls'); ?></legend>
196
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
197
- <tr valign="top">
198
- <th align="left" width="30%"><?php _e('Show Loading Image With Text', 'wp-polls'); ?></th>
199
- <td align="left">
200
- <select name="poll_ajax_style_loading" size="1">
201
- <option value="0"<?php selected('0', $poll_ajax_style['loading']); ?>><?php _e('No', 'wp-polls'); ?></option>
202
- <option value="1"<?php selected('1', $poll_ajax_style['loading']); ?>><?php _e('Yes', 'wp-polls'); ?></option>
203
- </select>
204
- </td>
205
- </tr>
206
- <tr valign="top">
207
- <th align="left" width="30%"><?php _e('Show Fading In And Fading Out Of Poll', 'wp-polls'); ?></th>
208
- <td align="left">
209
- <select name="poll_ajax_style_fading" size="1">
210
- <option value="0"<?php selected('0', $poll_ajax_style['fading']); ?>><?php _e('No', 'wp-polls'); ?></option>
211
- <option value="1"<?php selected('1', $poll_ajax_style['fading']); ?>><?php _e('Yes', 'wp-polls'); ?></option>
212
- </select>
213
- </td>
214
- </tr>
215
- </table>
216
- </fieldset>
217
- <fieldset class="options">
218
- <legend><?php _e('Sorting Of Poll Answers', 'wp-polls'); ?></legend>
219
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
220
- <tr valign="top">
221
- <th align="left" width="30%"><?php _e('Sort Poll Answers By:', 'wp-polls'); ?></th>
222
- <td align="left">
223
- <select name="poll_ans_sortby" size="1">
224
- <option value="polla_aid"<?php selected('polla_aid', get_option('poll_ans_sortby')); ?>><?php _e('Exact Order', 'wp-polls'); ?></option>
225
- <option value="polla_answers"<?php selected('polla_answers', get_option('poll_ans_sortby')); ?>><?php _e('Alphabetical Order', 'wp-polls'); ?></option>
226
- <option value="RAND()"<?php selected('RAND()', get_option('poll_ans_sortby')); ?>><?php _e('Random Order', 'wp-polls'); ?></option>
227
- </select>
228
- </td>
229
- </tr>
230
- <tr valign="top">
231
- <th align="left" width="30%"><?php _e('Sort Order Of Poll Answers:', 'wp-polls'); ?></th>
232
- <td align="left">
233
- <select name="poll_ans_sortorder" size="1">
234
- <option value="asc"<?php selected('asc', get_option('poll_ans_sortorder')); ?>><?php _e('Ascending', 'wp-polls'); ?></option>
235
- <option value="desc"<?php selected('desc', get_option('poll_ans_sortorder')); ?>><?php _e('Descending', 'wp-polls'); ?></option>
236
- </select>
237
- </td>
238
- </tr>
239
- </table>
240
- </fieldset>
241
- <fieldset class="options">
242
- <legend><?php _e('Sorting Of Poll Results', 'wp-polls'); ?></legend>
243
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
244
- <tr valign="top">
245
- <th align="left" width="30%"><?php _e('Sort Poll Results By:', 'wp-polls'); ?></th>
246
- <td align="left">
247
- <select name="poll_ans_result_sortby" size="1">
248
- <option value="polla_votes"<?php selected('polla_votes', get_option('poll_ans_result_sortby')); ?>><?php _e('Votes', 'wp-polls'); ?></option>
249
- <option value="polla_aid"<?php selected('polla_aid', get_option('poll_ans_result_sortby')); ?>><?php _e('Exact Order', 'wp-polls'); ?></option>
250
- <option value="polla_answers"<?php selected('polla_answers', get_option('poll_ans_result_sortby')); ?>><?php _e('Alphabetical Order', 'wp-polls'); ?></option>
251
- <option value="RAND()"<?php selected('RAND()', get_option('poll_ans_result_sortby')); ?>><?php _e('Random Order', 'wp-polls'); ?></option>
252
- </select>
253
- </td>
254
- </tr>
255
- <tr valign="top">
256
- <th align="left" width="30%"><?php _e('Sort Order Of Poll Results:', 'wp-polls'); ?></th>
257
- <td align="left">
258
- <select name="poll_ans_result_sortorder" size="1">
259
- <option value="asc"<?php selected('asc', get_option('poll_ans_result_sortorder')); ?>><?php _e('Ascending', 'wp-polls'); ?></option>
260
- <option value="desc"<?php selected('desc', get_option('poll_ans_result_sortorder')); ?>><?php _e('Descending', 'wp-polls'); ?></option>
261
- </select>
262
- </td>
263
- </tr>
264
- </table>
265
- </fieldset>
266
- <fieldset class="options">
267
- <legend><?php _e('Allow To Vote', 'wp-polls'); ?></legend>
268
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
269
- <tr valign="top">
270
- <th align="left" width="30%"><?php _e('Who Is Allowed To Vote?', 'wp-polls'); ?></th>
271
- <td align="left">
272
- <select name="poll_allowtovote" size="1">
273
- <option value="0"<?php selected('0', get_option('poll_allowtovote')); ?>><?php _e('Guests Only', 'wp-polls'); ?></option>
274
- <option value="1"<?php selected('1', get_option('poll_allowtovote')); ?>><?php _e('Registered Users Only', 'wp-polls'); ?></option>
275
- <option value="2"<?php selected('2', get_option('poll_allowtovote')); ?>><?php _e('Registered Users And Guests', 'wp-polls'); ?></option>
276
- </select>
277
- </td>
278
- </tr>
279
- </table>
280
- </fieldset>
281
- <fieldset class="options">
282
- <legend><?php _e('Logging Method', 'wp-polls'); ?></legend>
283
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
284
- <tr valign="top">
285
- <th align="left" width="30%"><?php _e('Poll Logging Method:', 'wp-polls'); ?></th>
286
- <td align="left">
287
- <select name="poll_logging_method" size="1">
288
- <option value="0"<?php selected('0', get_option('poll_logging_method')); ?>><?php _e('Do Not Log', 'wp-polls'); ?></option>
289
- <option value="1"<?php selected('1', get_option('poll_logging_method')); ?>><?php _e('Logged By Cookie', 'wp-polls'); ?></option>
290
- <option value="2"<?php selected('2', get_option('poll_logging_method')); ?>><?php _e('Logged By IP', 'wp-polls'); ?></option>
291
- <option value="3"<?php selected('3', get_option('poll_logging_method')); ?>><?php _e('Logged By Cookie And IP', 'wp-polls'); ?></option>
292
- <option value="4"<?php selected('4', get_option('poll_logging_method')); ?>><?php _e('Logged By Username', 'wp-polls'); ?></option>
293
- </select>
294
- </td>
295
- </tr>
296
- </table>
297
- </fieldset>
298
- <fieldset class="options">
299
- <legend><?php _e('Poll Archive', 'wp-polls'); ?></legend>
300
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
301
- <tr valign="top">
302
- <th align="left" width="30%"><?php _e('Number Of Polls Per Page:', 'wp-polls'); ?></th>
303
- <td align="left"><input type="text" name="poll_archive_perpage" value="<?php echo intval(get_option('poll_archive_perpage')); ?>" size="2" /></td>
304
- </tr>
305
- <tr valign="top">
306
- <th align="left" width="30%"><?php _e('Type Of Polls To Display In Poll Archive:', 'wp-polls'); ?></th>
307
- <td align="left">
308
- <select name="poll_archive_displaypoll" size="1">
309
- <option value="1"<?php selected('1', get_option('poll_archive_displaypoll')); ?>><?php _e('Closed Polls Only', 'wp-polls'); ?></option>
310
- <option value="2"<?php selected('2', get_option('poll_archive_displaypoll')); ?>><?php _e('Opened Polls Only', 'wp-polls'); ?></option>
311
- <option value="3"<?php selected('3', get_option('poll_archive_displaypoll')); ?>><?php _e('Closed And Opened Polls', 'wp-polls'); ?></option>
312
- </select>
313
- </td>
314
- </tr>
315
- <tr valign="top">
316
- <th align="left" width="30%"><?php _e('Poll Archive URL:', 'wp-polls'); ?></th>
317
- <td align="left"><input type="text" name="poll_archive_url" value="<?php echo get_option('poll_archive_url'); ?>" size="50" /></td>
318
- </tr>
319
- <tr valign="top">
320
- <th align="left" width="30%"><?php _e('Display Poll Archive Link Below Poll?', 'wp-polls'); ?></th>
321
- <td align="left">
322
- <select name="poll_archive_show" size="1">
323
- <option value="0"<?php selected('0', get_option('poll_archive_show')); ?>><?php _e('No', 'wp-polls'); ?></option>
324
- <option value="1"<?php selected('1', get_option('poll_archive_show')); ?>><?php _e('Yes', 'wp-polls'); ?></option>
325
- </select>
326
- </td>
327
- </tr>
328
- <tr valign="top">
329
- <th align="left" colspan="2"><em><?php _e('Note: Only polls\' results will be shown in the Poll Archive regardless of whether the poll is closed or opened.', 'wp-polls'); ?></em></th>
330
- </tr>
331
- </table>
332
- </fieldset>
333
- <fieldset class="options">
334
- <legend><?php _e('Current Active Poll', 'wp-polls'); ?></legend>
335
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
336
- <tr valign="top">
337
- <th align="left" width="30%"><?php _e('Current Active Poll', 'wp-polls'); ?>:</th>
338
- <td align="left">
339
- <select name="poll_currentpoll" size="1">
340
- <option value="-1"<?php selected(-1, get_option('poll_currentpoll')); ?>><?php _e('Do NOT Display Poll (Disable)', 'wp-polls'); ?></option>
341
- <option value="-2"<?php selected(-2, get_option('poll_currentpoll')); ?>><?php _e('Display Random Poll', 'wp-polls'); ?></option>
342
- <option value="0"<?php selected(0, get_option('poll_currentpoll')); ?>><?php _e('Display Latest Poll', 'wp-polls'); ?></option>
343
- <?php if(function_exists('dynamic_sidebar')) { ?>
344
- <option value="-3"<?php selected(-3, get_option('poll_currentpoll')); ?>><?php _e('Display Multiple Polls', 'wp-polls'); ?></option>
345
- <?php } ?>
346
- <option value="0">&nbsp;</option>
347
- <?php
348
- $polls = $wpdb->get_results("SELECT pollq_id, pollq_question FROM $wpdb->pollsq ORDER BY pollq_id DESC");
349
- if($polls) {
350
- foreach($polls as $poll) {
351
- $poll_question = stripslashes($poll->pollq_question);
352
- $poll_id = intval($poll->pollq_id);
353
- if($poll_id == intval(get_option('poll_currentpoll'))) {
354
- echo "<option value=\"$poll_id\" selected=\"selected\">$poll_question</option>\n";
355
- } else {
356
- echo "<option value=\"$poll_id\">$poll_question</option>\n";
357
- }
358
- }
359
- }
360
- ?>
361
- </select>
362
- </td>
363
- </tr>
364
- <?php if(function_exists('dynamic_sidebar')) { ?>
365
- <tr valign="top">
366
- <th align="left" colspan="2"><em><?php _e('Note: If you chose \'Display Multiple Polls\' for the above option, you need to configure it in Presentation -> Widgets -> Poll.', 'wp-polls'); ?></em></th>
367
- </tr>
368
- <?php } ?>
369
- <tr valign="top">
370
- <th align="left" width="30%"><?php _e('When Poll Is Closed', 'wp-polls'); ?>:</th>
371
- <td align="left">
372
- <select name="poll_close" size="1">
373
- <option value="1"<?php selected(1, get_option('poll_close')); ?>><?php _e('Display Poll\'s Results', 'wp-polls'); ?></option>
374
- <option value="2"<?php selected(2, get_option('poll_close')); ?>><?php _e('Do Not Display Poll In Post/Sidebar', 'wp-polls'); ?></option>
375
- </select>
376
- </td>
377
- </tr>
378
- </table>
379
- </fieldset>
380
- <div align="center">
381
- <input type="submit" name="Submit" class="button" value="<?php _e('Update Options', 'wp-polls'); ?>" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-polls'); ?>" class="button" onclick="javascript:history.go(-1)" />
382
- </div>
383
- </div>
384
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
polls/polls-templates.php DELETED
@@ -1,467 +0,0 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.1 Plugin: WP-Polls 2.21 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Configure Poll Templates |
14
- | - wp-content/plugins/polls/polls-templates.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Check Whether User Can Manage Polls
21
- if(!current_user_can('manage_polls')) {
22
- die('Access Denied');
23
- }
24
-
25
-
26
- ### Variables Variables Variables
27
- $base_name = plugin_basename('polls/polls-templates.php');
28
- $base_page = 'admin.php?page='.$base_name;
29
- $id = intval($_GET['id']);
30
-
31
-
32
- ### If Form Is Submitted
33
- if($_POST['Submit']) {
34
- $poll_template_voteheader =trim($_POST['poll_template_voteheader']);
35
- $poll_template_votebody = trim($_POST['poll_template_votebody']);
36
- $poll_template_votefooter = trim($_POST['poll_template_votefooter']);
37
- $poll_template_resultheader = trim($_POST['poll_template_resultheader']);
38
- $poll_template_resultbody = trim($_POST['poll_template_resultbody']);
39
- $poll_template_resultbody2 = trim($_POST['poll_template_resultbody2']);
40
- $poll_template_resultfooter = trim($_POST['poll_template_resultfooter']);
41
- $poll_template_resultfooter2 = trim($_POST['poll_template_resultfooter2']);
42
- $poll_template_pollarchivelink = trim($_POST['poll_template_pollarchivelink']);
43
- $poll_template_pollarchiveheader = trim($_POST['poll_template_pollarchiveheader']);
44
- $poll_template_pollarchivefooter = trim($_POST['poll_template_pollarchivefooter']);
45
- $poll_template_disable = trim($_POST['poll_template_disable']);
46
- $poll_template_error = trim($_POST['poll_template_error']);
47
- $update_poll_queries = array();
48
- $update_poll_text = array();
49
- $update_poll_queries[] = update_option('poll_template_voteheader', $poll_template_voteheader);
50
- $update_poll_queries[] = update_option('poll_template_votebody', $poll_template_votebody);
51
- $update_poll_queries[] = update_option('poll_template_votefooter', $poll_template_votefooter);
52
- $update_poll_queries[] = update_option('poll_template_resultheader', $poll_template_resultheader);
53
- $update_poll_queries[] = update_option('poll_template_resultbody', $poll_template_resultbody);
54
- $update_poll_queries[] = update_option('poll_template_resultbody2', $poll_template_resultbody2);
55
- $update_poll_queries[] = update_option('poll_template_resultfooter', $poll_template_resultfooter);
56
- $update_poll_queries[] = update_option('poll_template_resultfooter2', $poll_template_resultfooter2);
57
- $update_poll_queries[] = update_option('poll_template_pollarchivelink', $poll_template_pollarchivelink);
58
- $update_poll_queries[] = update_option('poll_template_pollarchiveheader', $poll_template_pollarchiveheader);
59
- $update_poll_queries[] = update_option('poll_template_pollarchivefooter', $poll_template_pollarchivefooter);
60
- $update_poll_queries[] = update_option('poll_template_disable', $poll_template_disable);
61
- $update_poll_queries[] = update_option('poll_template_error', $poll_template_error);
62
- $update_poll_text[] = __('Voting Form Header Template', 'wp-polls');
63
- $update_poll_text[] = __('Voting Form Body Template', 'wp-polls');
64
- $update_poll_text[] = __('Voting Form Footer Template', 'wp-polls');
65
- $update_poll_text[] = __('Result Header Template', 'wp-polls');
66
- $update_poll_text[] = __('Result Body Template', 'wp-polls');
67
- $update_poll_text[] = __('Result Body2 Template', 'wp-polls');
68
- $update_poll_text[] = __('Result Footer Template', 'wp-polls');
69
- $update_poll_text[] = __('Result Footer2 Template', 'wp-polls');
70
- $update_poll_text[] = __('Poll Archive Link Template', 'wp-polls');
71
- $update_poll_text[] = __('Poll Archive Poll Header Template', 'wp-polls');
72
- $update_poll_text[] = __('Poll Archive Poll Footer Template', 'wp-polls');
73
- $update_poll_text[] = __('Poll Disabled Template', 'wp-polls');
74
- $update_poll_text[] = __('Poll Error Template', 'wp-polls');
75
- $i=0;
76
- $text = '';
77
- foreach($update_poll_queries as $update_poll_query) {
78
- if($update_poll_query) {
79
- $text .= '<font color="green">'.$update_poll_text[$i].' '.__('Updated', 'wp-polls').'</font><br />';
80
- }
81
- $i++;
82
- }
83
- if(empty($text)) {
84
- $text = '<font color="red">'.__('No Poll Option Updated', 'wp-polls').'</font>';
85
- }
86
- wp_clear_scheduled_hook('polls_cron');
87
- if (!wp_next_scheduled('polls_cron')) {
88
- wp_schedule_event(time(), 'daily', 'polls_cron');
89
- }
90
- }
91
- ?>
92
- <script type="text/javascript">
93
- /* <![CDATA[*/
94
- function poll_default_templates(template) {
95
- var default_template;
96
- switch(template) {
97
- case "voteheader":
98
- default_template = "<p style=\"text-align: center;\"><strong>%POLL_QUESTION%</strong></p>\n<div id=\"polls-%POLL_ID%-ans\" class=\"wp-polls-ans\">\n<ul class=\"wp-polls-ul\">";
99
- break;
100
- case "votebody":
101
- default_template = "<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>";
102
- break;
103
- case "votefooter":
104
- default_template = "</ul>\n<p style=\"text-align: center;\"><input type=\"button\" name=\"vote\" value=\" <?php _e('Vote', 'wp-polls'); ?> \" class=\"Buttons\" onclick=\"poll_vote(%POLL_ID%);\" /></p>\n<p style=\"text-align: center;\"><a href=\"#ViewPollResults\" onclick=\"poll_result(%POLL_ID%); return false;\" title=\"<?php _e('View Results Of This Poll', 'wp-polls'); ?>\"><?php _e('View Results', 'wp-polls'); ?></a></p>\n</div>";
105
- break;
106
- case "resultheader":
107
- default_template = "<p style=\"text-align: center;\"><strong>%POLL_QUESTION%</strong></p>\n<div id=\"polls-%POLL_ID%-ans\" class=\"wp-polls-ans\">\n<ul class=\"wp-polls-ul\">";
108
- break;
109
- case "resultbody":
110
- default_template = "<li>%POLL_ANSWER% <small>(%POLL_ANSWER_PERCENTAGE%%, %POLL_ANSWER_VOTES% <?php _e('Votes', 'wp-polls'); ?>)</small><div class=\"pollbar\" style=\"width: %POLL_ANSWER_IMAGEWIDTH%%;\" title=\"%POLL_ANSWER_TEXT% (%POLL_ANSWER_PERCENTAGE%% | %POLL_ANSWER_VOTES% <?php _e('Votes', 'wp-polls'); ?>)\"></div></li>";
111
- break;
112
- case "resultbody2":
113
- default_template = "<li><strong><i>%POLL_ANSWER% <small>(%POLL_ANSWER_PERCENTAGE%%, %POLL_ANSWER_VOTES% <?php _e('Votes', 'wp-polls'); ?>)</small></i></strong><div class=\"pollbar\" style=\"width: %POLL_ANSWER_IMAGEWIDTH%%;\" title=\"<?php _e('You Have Voted For This Choice', 'wp-polls'); ?> - %POLL_ANSWER_TEXT% (%POLL_ANSWER_PERCENTAGE%% | %POLL_ANSWER_VOTES% <?php _e('Votes', 'wp-polls'); ?>)\"></div></li>";
114
- break;
115
- case "resultfooter":
116
- default_template = "</ul>\n<p style=\"text-align: center;\"><?php _e('Total Voters', 'wp-polls'); ?>: <strong>%POLL_TOTALVOTERS%</strong></p>\n</div>";
117
- break;
118
- case "resultfooter2":
119
- default_template = "</ul>\n<p style=\"text-align: center;\"><?php _e('Total Voters', 'wp-polls'); ?>: <strong>%POLL_TOTALVOTERS%</strong></p>\n<p style=\"text-align: center;\"><a href=\"#VotePoll\" onclick=\"poll_booth(%POLL_ID%); return false;\" title=\"<?php _e('Vote For This Poll', 'wp-polls'); ?>\"><?php _e('Vote', 'wp-polls'); ?></a></p>\n</div>";
120
- break;
121
- case "pollarchivelink":
122
- default_template = "<ul>\n<li><a href=\"%POLL_ARCHIVE_URL%\"><?php _e('Polls Archive', 'wp-polls'); ?></a></li>\n</ul>";
123
- break;
124
- case "pollarchiveheader":
125
- default_template = "";
126
- break;
127
- case "pollarchivefooter":
128
- default_template = "<p><?php _e('Start Date:', 'wp-polls'); ?> %POLL_START_DATE%<br /><?php _e('End Date:', 'wp-polls'); ?> %POLL_END_DATE%</p>";
129
- break;
130
- case "disable":
131
- default_template = "<?php _e('Sorry, there are no polls available at the moment.', 'wp-polls'); ?>";
132
- break;
133
- case "error":
134
- default_template = "<?php _e('An error has occurred when processing your poll.', 'wp-polls'); ?>";
135
- break;
136
- }
137
- document.getElementById("poll_template_" + template).value = default_template;
138
- }
139
- /* ]]> */
140
- </script>
141
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
142
- <form id="poll_options_form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
143
- <div class="wrap">
144
- <h2><?php _e('Poll Templates', 'wp-polls'); ?></h2>
145
- <fieldset class="options">
146
- <legend><?php _e('Template Variables', 'wp-polls'); ?></legend>
147
- <table width="100%" border="0" cellspacing="0" cellpadding="5">
148
- <tr>
149
- <td>
150
- <strong>%POLL_ID%</strong><br />
151
- <?php _e('Display the poll\'s ID', 'wp-polls'); ?>
152
- </td>
153
- <td>
154
- <strong>%POLL_ANSWER_ID%</strong><br />
155
- <?php _e('Display the poll\'s answer ID', 'wp-polls'); ?>
156
- </td>
157
- </tr>
158
- <tr>
159
- <td>
160
- <strong>%POLL_QUESTION%</strong><br />
161
- <?php _e('Display the poll\'s question', 'wp-polls'); ?>
162
- </td>
163
- <td>
164
- <strong>%POLL_ANSWER%</strong><br />
165
- <?php _e('Display the poll\'s answer', 'wp-polls'); ?>
166
- </td>
167
- </tr>
168
- <tr>
169
- <td>
170
- <strong>%POLL_TOTALVOTES%</strong><br />
171
- <?php _e('Display the poll\'s total votes NOT the number of people who voted for the poll', 'wp-polls'); ?>
172
- </td>
173
- <td>
174
- <strong>%POLL_ANSWER_TEXT%</strong><br />
175
- <?php _e('Display the poll\'s answer without HTML formatting.', 'wp-polls'); ?>
176
- </td>
177
- </tr>
178
- <tr>
179
- <td>
180
- <strong>%POLL_RESULT_URL%</strong><br />
181
- <?php _e('Displays URL to poll\'s result', 'wp-polls'); ?>
182
- </td>
183
- <td>
184
- <strong>%POLL_ANSWER_VOTES%</strong><br />
185
- <?php _e('Display the poll\'s answer votes', 'wp-polls'); ?>
186
- </td>
187
- </tr>
188
- <tr>
189
- <td>
190
- <strong>%POLL_MOST_ANSWER%</strong><br />
191
- <?php _e('Display the poll\'s most voted answer', 'wp-polls'); ?>
192
- </td>
193
- <td>
194
- <strong>%POLL_ANSWER_PERCENTAGE%</strong><br />
195
- <?php _e('Display the poll\'s answer percentage', 'wp-polls'); ?>
196
- </td>
197
- </tr>
198
- <tr>
199
- <td>
200
- <strong>%POLL_MOST_VOTES%</strong><br />
201
- <?php _e('Display the poll\'s answer votes for the most voted answer', 'wp-polls'); ?>
202
- </td>
203
- <td>
204
- <strong>%POLL_ANSWER_IMAGEWIDTH%</strong><br />
205
- <?php _e('Display the poll\'s answer image width', 'wp-polls'); ?>
206
- </td>
207
- </tr>
208
- <tr>
209
- <td>
210
- <strong>%POLL_MOST_PERCENTAGE%</strong><br />
211
- <?php _e('Display the poll\'s answer percentage for the most voted answer', 'wp-polls'); ?>
212
- </td>
213
- <td>
214
- <strong>%POLL_LEAST_ANSWER%</strong><br />
215
- <?php _e('Display the poll\'s least voted answer', 'wp-polls'); ?>
216
- </td>
217
- </tr>
218
- <tr>
219
- <td>
220
- <strong>%POLL_START_DATE%</strong><br />
221
- <?php _e('Display the poll\'s start date/time', 'wp-polls'); ?>
222
- </td>
223
- <td>
224
- <strong>%POLL_LEAST_VOTES%</strong><br />
225
- <?php _e('Display the poll\'s answer votes for the least voted answer', 'wp-polls'); ?>
226
- </td>
227
- </tr>
228
- <tr>
229
- <td>
230
- <strong>%POLL_END_DATE%</strong><br />
231
- <?php _e('Display the poll\'s end date/time', 'wp-polls'); ?>
232
- </td>
233
- <td>
234
- <strong>%POLL_LEAST_PERCENTAGE%</strong><br />
235
- <?php _e('Display the poll\'s answer percentage for the least voted answer', 'wp-polls'); ?>
236
- </td>
237
- </tr>
238
- <tr>
239
- <td>
240
- <strong>%POLL_MULTIPLE_ANS_MAX%</strong><br />
241
- <?php _e('Display the the maximum number of answers the user can choose if the poll supports multiple answers', 'wp-polls'); ?>
242
- </td>
243
- <td>
244
- <strong>%POLL_CHECKBOX_RADIO%</strong><br />
245
- <?php _e('Display "checkbox" or "radio" input types depending on the poll type', 'wp-polls'); ?>
246
- </td>
247
- </tr>
248
- <tr>
249
- <td>
250
- <strong>%POLL_TOTALVOTERS%</strong><br />
251
- <?php _e('Display the number of people who voted for the poll NOT the total votes of the poll', 'wp-polls'); ?>
252
- </td>
253
- <td>
254
- <strong>%POLL_ARCHIVE_URL%</strong><br />
255
- <?php _e('Display the poll archive URL', 'wp-polls'); ?>
256
- </td>
257
- </tr>
258
- <tr>
259
- <td colspan="2">
260
- <strong><?php _e('Note:', 'wp-polls'); ?></strong><br />
261
- <?php _e('<strong>%POLL_TOTALVOTES%</strong> and <strong>%POLL_TOTALVOTERS%</strong> will be different if your poll supports multiple answers. If your poll allows only single answer, both value will be the same.', 'wp-polls'); ?>
262
- </td>
263
- </tr>
264
- </table>
265
- </fieldset>
266
- <fieldset class="options">
267
- <legend><?php _e('Poll Voting Form Templates', 'wp-polls'); ?></legend>
268
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
269
- <tr valign="top">
270
- <td width="30%" align="left">
271
- <strong><?php _e('Voting Form Header:', 'wp-polls'); ?></strong><br /><br /><br />
272
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
273
- - %POLL_ID%<br />
274
- - %POLL_QUESTION%<br />
275
- - %POLL_START_DATE%<br />
276
- - %POLL_END_DATE%<br />
277
- - %POLL_TOTALVOTES%<br />
278
- - %POLL_TOTALVOTERS%<br />
279
- - %POLL_MULTIPLE_ANS_MAX%<br /><br />
280
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('voteheader');" class="button" />
281
- </td>
282
- <td align="left"><textarea cols="80" rows="12" id="poll_template_voteheader" name="poll_template_voteheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_voteheader'))); ?></textarea></td>
283
- </tr>
284
- <tr valign="top">
285
- <td width="30%" align="left">
286
- <strong><?php _e('Voting Form Body:', 'wp-polls'); ?></strong><br /><br /><br />
287
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
288
- - %POLL_ID%<br />
289
- - %POLL_ANSWER_ID%<br />
290
- - %POLL_ANSWER%<br />
291
- - %POLL_ANSWER_VOTES%<br />
292
- - %POLL_CHECKBOX_RADIO%<br /><br />
293
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('votebody');" class="button" />
294
- </td>
295
- <td align="left"><textarea cols="80" rows="12" id="poll_template_votebody" name="poll_template_votebody"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_votebody'))); ?></textarea></td>
296
- </tr>
297
- <tr valign="top">
298
- <td width="30%" align="left">
299
- <strong><?php _e('Voting Form Footer:', 'wp-polls'); ?></strong><br /><br /><br />
300
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
301
- - %POLL_ID%<br />
302
- - %POLL_RESULT_URL%<br />
303
- - %POLL_MULTIPLE_ANS_MAX%<br /><br />
304
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('votefooter');" class="button" />
305
- </td>
306
- <td align="left"><textarea cols="80" rows="12" id="poll_template_votefooter" name="poll_template_votefooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_votefooter'))); ?></textarea></td>
307
- </tr>
308
- </table>
309
- </fieldset>
310
- <fieldset class="options">
311
- <legend><?php _e('Poll Result Templates', 'wp-polls'); ?></legend>
312
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
313
- <tr valign="top">
314
- <td width="30%" align="left">
315
- <strong><?php _e('Result Header:', 'wp-polls'); ?></strong><br /><br /><br />
316
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
317
- - %POLL_ID%<br />
318
- - %POLL_QUESTION%<br />
319
- - %POLL_START_DATE%<br />
320
- - %POLL_END_DATE%<br />
321
- - %POLL_TOTALVOTES%<br />
322
- - %POLL_TOTALVOTERS%<br />
323
- - %POLL_MULTIPLE_ANS_MAX%<br /><br />
324
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultheader');" class="button" />
325
- </td>
326
- <td align="left"><textarea cols="80" rows="12" id="poll_template_resultheader" name="poll_template_resultheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultheader'))); ?></textarea></td>
327
- </tr>
328
- <tr valign="top">
329
- <td width="30%" align="left">
330
- <strong><?php _e('Result Body:', 'wp-polls'); ?></strong><br /><?php _e('Displayed When The User HAS NOT Voted', 'wp-polls'); ?><br /><br />
331
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
332
- - %POLL_ANSWER_ID%<br />
333
- - %POLL_ANSWER%<br />
334
- - %POLL_ANSWER_TEXT%<br />
335
- - %POLL_ANSWER_VOTES%<br />
336
- - %POLL_ANSWER_PERCENTAGE%<br />
337
- - %POLL_ANSWER_IMAGEWIDTH%<br /><br />
338
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultbody');" class="button" />
339
- </td>
340
- <td align="left"><textarea cols="80" rows="12" id="poll_template_resultbody" name="poll_template_resultbody"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultbody'))); ?></textarea></td>
341
- </tr>
342
- <tr valign="top">
343
- <td width="30%" align="left">
344
- <strong><?php _e('Result Body:', 'wp-polls'); ?></strong><br /><?php _e('Displayed When The User HAS Voted', 'wp-polls'); ?><br /><br />
345
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
346
- - %POLL_ANSWER_ID%<br />
347
- - %POLL_ANSWER%<br />
348
- - %POLL_ANSWER_TEXT%<br />
349
- - %POLL_ANSWER_VOTES%<br />
350
- - %POLL_ANSWER_PERCENTAGE%<br />
351
- - %POLL_ANSWER_IMAGEWIDTH%<br /><br />
352
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultbody2');" class="button" />
353
- </td>
354
- <td align="left"><textarea cols="80" rows="12" id="poll_template_resultbody2" name="poll_template_resultbody2"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultbody2'))); ?></textarea></td>
355
- </tr>
356
- <tr valign="top">
357
- <td width="30%" align="left">
358
- <strong><?php _e('Result Footer:', 'wp-polls'); ?></strong><br /><?php _e('Displayed When The User HAS Voted', 'wp-polls'); ?><br /><br />
359
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
360
- - %POLL_ID%<br />
361
- - %POLL_START_DATE%<br />
362
- - %POLL_END_DATE%<br />
363
- - %POLL_TOTALVOTES%<br />
364
- - %POLL_TOTALVOTERS%<br />
365
- - %POLL_MOST_ANSWER%<br />
366
- - %POLL_MOST_VOTES%<br />
367
- - %POLL_MOST_PERCENTAGE%<br />
368
- - %POLL_LEAST_ANSWER%<br />
369
- - %POLL_LEAST_VOTES%<br />
370
- - %POLL_LEAST_PERCENTAGE%<br />
371
- - %POLL_MULTIPLE_ANS_MAX%<br /><br />
372
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultfooter');" class="button" />
373
- </td>
374
- <td align="left"><textarea cols="80" rows="12" id="poll_template_resultfooter" name="poll_template_resultfooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultfooter'))); ?></textarea></td>
375
- </tr>
376
- <tr valign="top">
377
- <td width="30%" align="left">
378
- <strong><?php _e('Result Footer:', 'wp-polls'); ?></strong><br /><?php _e('Displayed When The User HAS NOT Voted', 'wp-polls'); ?><br /><br />
379
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
380
- - %POLL_ID%<br />
381
- - %POLL_START_DATE%<br />
382
- - %POLL_END_DATE%<br />
383
- - %POLL_TOTALVOTES%<br />
384
- - %POLL_TOTALVOTERS%<br />
385
- - %POLL_MOST_ANSWER%<br />
386
- - %POLL_MOST_VOTES%<br />
387
- - %POLL_MOST_PERCENTAGE%<br />
388
- - %POLL_LEAST_ANSWER%<br />
389
- - %POLL_LEAST_VOTES%<br />
390
- - %POLL_LEAST_PERCENTAGE%<br />
391
- - %POLL_MULTIPLE_ANS_MAX%<br /><br />
392
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultfooter2');" class="button" />
393
- </td>
394
- <td align="left"><textarea cols="80" rows="12" id="poll_template_resultfooter2" name="poll_template_resultfooter2"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultfooter2'))); ?></textarea></td>
395
- </tr>
396
- </table>
397
- </fieldset>
398
- <fieldset class="options">
399
- <legend><?php _e('Poll Archive Templates', 'wp-polls'); ?></legend>
400
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
401
- <tr valign="top">
402
- <td width="30%" align="left">
403
- <strong><?php _e('Poll Archive Link', 'wp-polls'); ?></strong><br /><?php _e('Template For Displaying Poll Archive Link', 'wp-polls'); ?><br /><br />
404
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
405
- - %POLL_ARCHIVE_URL%<br /><br />
406
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivelink');" class="button" />
407
- </td>
408
- <td align="left"><textarea cols="80" rows="12" id="poll_template_pollarchivelink" name="poll_template_pollarchivelink"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchivelink'))); ?></textarea></td>
409
- </tr>
410
- <tr valign="top">
411
- <td width="30%" align="left">
412
- <strong><?php _e('Individual Poll Header', 'wp-polls'); ?></strong><br /><?php _e('Displayed Before Each Poll In The Poll Archive', 'wp-polls'); ?><br /><br />
413
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
414
- - <?php _e('N/A', 'wp-polls'); ?><br /><br />
415
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchiveheader');" class="button" />
416
- </td>
417
- <td align="left"><textarea cols="80" rows="12" id="poll_template_pollarchiveheader" name="poll_template_pollarchiveheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchiveheader'))); ?></textarea></td>
418
- </tr>
419
- <tr valign="top">
420
- <td width="30%" align="left">
421
- <strong><?php _e('Individual Poll Footer', 'wp-polls'); ?></strong><br /><?php _e('Displayed After Each Poll In The Poll Archive', 'wp-polls'); ?><br /><br />
422
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
423
- - %POLL_START_DATE%<br />
424
- - %POLL_END_DATE%<br />
425
- - %POLL_TOTALVOTES%<br />
426
- - %POLL_TOTALVOTERS%<br />
427
- - %POLL_MOST_ANSWER%<br />
428
- - %POLL_MOST_VOTES%<br />
429
- - %POLL_MOST_PERCENTAGE%<br />
430
- - %POLL_LEAST_ANSWER%<br />
431
- - %POLL_LEAST_VOTES%<br />
432
- - %POLL_LEAST_PERCENTAGE%<br />
433
- - %POLL_MULTIPLE_ANS_MAX%<br /><br />
434
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivefooter');" class="button" />
435
- </td>
436
- <td align="left"><textarea cols="80" rows="12" id="poll_template_pollarchivefooter" name="poll_template_pollarchivefooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchivefooter'))); ?></textarea></td>
437
- </tr>
438
- </table>
439
- </fieldset>
440
- <fieldset class="options">
441
- <legend><?php _e('Poll Misc Templates', 'wp-polls'); ?></legend>
442
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
443
- <tr valign="top">
444
- <td width="30%" align="left">
445
- <strong><?php _e('Poll Disabled', 'wp-polls'); ?></strong><br /><?php _e('Displayed When The Poll Is Disabled', 'wp-polls'); ?><br /><br />
446
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
447
- - <?php _e('N/A', 'wp-polls'); ?><br /><br />
448
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('disable');" class="button" />
449
- </td>
450
- <td align="left"><textarea cols="80" rows="12" id="poll_template_disable" name="poll_template_disable"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_disable'))); ?></textarea></td>
451
- </tr>
452
- <tr valign="top">
453
- <td width="30%" align="left">
454
- <strong><?php _e('Poll Error', 'wp-polls'); ?></strong><br /><?php _e('Displayed When An Error Has Occured While Processing The Poll', 'wp-polls'); ?><br /><br />
455
- <?php _e('Allowed Variables:', 'wp-polls'); ?><br />
456
- - <?php _e('N/A', 'wp-polls'); ?><br /><br />
457
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('error');" class="button" />
458
- </td>
459
- <td align="left"><textarea cols="80" rows="12" id="poll_template_error" name="poll_template_error"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_error'))); ?></textarea></td>
460
- </tr>
461
- </table>
462
- </fieldset>
463
- <div align="center">
464
- <input type="submit" name="Submit" class="button" value="<?php _e('Update Templates', 'wp-polls'); ?>" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-polls'); ?>" class="button" onclick="javascript:history.go(-1)" />
465
- </div>
466
- </div>
467
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
polls/polls-usage.php DELETED
@@ -1,150 +0,0 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.1 Plugin: WP-Polls 2.21 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - How To Use WP-Polls |
14
- | - wp-content/plugins/polls/polls-usage.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Check Whether User Can Manage Polls
21
- if(!current_user_can('manage_polls')) {
22
- die('Access Denied');
23
- }
24
- ?>
25
- <div class="wrap">
26
- <h2><?php _e('General Usage (Without Widget)', 'wp-polls'); ?></h2>
27
- <ol>
28
- <li>
29
- <?php _e('Open ', 'wp-polls'); ?><strong>wp-content/themes/&lt;<?php _e('YOUR THEME NAME', 'wp-polls'); ?>&gt;/sidebar.php</strong>
30
- </li>
31
- <li>
32
- <?php _e('Add:', 'wp-polls'); ?>
33
- <blockquote>
34
- <pre class="wp-polls-usage-pre">&lt;?php if (function_exists('vote_poll') &amp;&amp; !in_pollarchive()): ?&gt;
35
- &lt;li&gt;
36
- &nbsp;&nbsp;&nbsp;&lt;h2&gt;Polls&lt;/h2&gt;
37
- &nbsp;&nbsp;&nbsp;&lt;ul&gt;
38
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;?php get_poll();?&gt;&lt;/li&gt;
39
- &nbsp;&nbsp;&nbsp;&lt;/ul&gt;
40
- &nbsp;&nbsp;&nbsp;&lt;?php display_polls_archive_link(); ?&gt;
41
- &lt;/li&gt;
42
- &lt;?php endif; ?&gt; </pre>
43
- </blockquote>
44
- <?php _e('To show specific poll, use :', 'wp-polls'); ?>
45
- <blockquote><pre class="wp-polls-usage-pre">&lt;?php get_poll(<strong>2</strong>);?&gt;</pre></blockquote>
46
- <?php _e('where <strong>2</strong> is your poll id.', 'wp-polls'); ?>
47
- <?php _e('To embed a specific poll in your post, use :', 'wp-polls'); ?>
48
- <blockquote><pre class="wp-polls-usage-pre">[poll=<strong>2</strong>]</pre></blockquote>
49
- <?php _e('where <strong>2</strong> is your poll id.', 'wp-polls'); ?>
50
- </li>
51
- <li>
52
- <?php _e('Scroll down for instructions on how to create <strong>Polls Archive</strong>.', 'wp-polls'); ?>
53
- </li>
54
- </ol>
55
- </div>
56
- <div class="wrap">
57
- <h2><?php _e('General Usage (With Widget)', 'wp-polls'); ?></h2>
58
- <ol>
59
- <li>
60
- <?php _e('<strong>Activate</strong> WP-Polls Widget Plugin', 'wp-polls'); ?>
61
- </li>
62
- <li>
63
- <?php _e('Go to \'WP-Admin -> Presentation -> Sidebar Widgets\'', 'wp-polls'); ?>
64
- </li>
65
- <li>
66
- <?php _e('<strong>Drag</strong> the Polls Widget to your sidebar', 'wp-polls'); ?>
67
- </li>
68
- <li>
69
- <?php _e('You can <strong>configure</strong> the Polls Widget by clicking on the configure icon', 'wp-polls'); ?>
70
- </li>
71
- <li>
72
- <?php _e('Click \'Save changes\'', 'wp-polls'); ?>
73
- </li>
74
- <li>
75
- <?php _e(' down for instructions on how to create a <strong>Polls Archive</strong>.', 'wp-polls'); ?>
76
- </li>
77
- </ol>
78
- </div>
79
- <div class="wrap">
80
- <h2><?php _e('Polls Archive', 'wp-polls'); ?></h2>
81
- <ol>
82
- <li>
83
- <?php _e('Go to \'WP-Admin -> Write -> Write Page\'', 'wp-polls'); ?>
84
- </li>
85
- <li>
86
- <?php _e('Type any title you like in the post\'s title area', 'wp-polls'); ?>
87
- </li>
88
- <li>
89
- <?php printf(__('Type \'<strong>%s</strong>\' in the post\'s content area (without the quotes)', 'wp-polls'), '[page_polls]'); ?>
90
- </li>
91
- <li>
92
- <?php _e('Type \'<strong>pollsarchive</strong>\' in the post\'s slug area (without the quotes)', 'wp-polls'); ?>
93
- </li>
94
- <li>
95
- <?php _e('Click \'Publish\'', 'wp-polls'); ?>
96
- </li>
97
- <li>
98
- <?php _e('If you <strong>ARE NOT</strong> using nice permalinks, you need to go to \'WP-Admin -> Polls -> Poll Option\' and under \'<strong>Poll Archive -> Polls Archive URL</strong>\', you need to fill in the URL to the Polls Archive Page you created above.', 'wp-polls'); ?>
99
- </li>
100
- </ol>
101
- </div>
102
- <div class="wrap">
103
- <h2><?php _e('Polls Stats', 'wp-polls'); ?></h2>
104
- <h3><?php _e('To Display Total Polls', 'wp-polls'); ?></h3>
105
- <blockquote>
106
- <pre class="wp-polls-usage-pre">&lt;?php if (function_exists('get_pollquestions')): ?&gt;
107
- &nbsp;&nbsp;&nbsp;&lt;?php get_pollquestions(); ?&gt;
108
- &lt;?php endif; ?&gt; </pre>
109
- </blockquote>
110
- <h3><?php _e('To Display Total Poll Answers', 'wp-polls'); ?></h3>
111
- <blockquote>
112
- <pre class="wp-polls-usage-pre">&lt;?php if (function_exists('get_pollanswers')): ?&gt;
113
- &nbsp;&nbsp;&nbsp;&lt;?php get_pollanswers(); ?&gt;
114
- &lt;?php endif; ?&gt; </pre>
115
- </blockquote>
116
- <h3><?php _e('To Display Total Poll Votes', 'wp-polls'); ?></h3>
117
- <blockquote>
118
- <pre class="wp-polls-usage-pre">&lt;?php if (function_exists('get_pollvotes')): ?&gt;
119
- &nbsp;&nbsp;&nbsp;&lt;?php get_pollvotes(); ?&gt;
120
- &lt;?php endif; ?&gt; </pre>
121
- </blockquote>
122
- <h3><?php _e('To Display Total Poll Voters', 'wp-polls'); ?></h3>
123
- <blockquote>
124
- <pre class="wp-polls-usage-pre">&lt;?php if (function_exists('get_pollvoters')): ?&gt;
125
- &nbsp;&nbsp;&nbsp;&lt;?php get_pollvoters(); ?&gt;
126
- &lt;?php endif; ?&gt; </pre>
127
- </blockquote>
128
- </div>
129
- <div class="wrap">
130
- <h2><?php _e('Note', 'wp-polls'); ?></h2>
131
- <ul>
132
- <li>
133
- <?php _e('In IE, some of the poll\'s text may appear jagged (this is normal in IE). To solve this issue,', 'wp-polls'); ?>
134
- <ol>
135
- <li>
136
- <?php _e('Open <strong>poll-css.css</strong>', 'wp-polls'); ?>
137
- </li>
138
- <li>
139
- <?php _e('Find:', 'wp-polls'); ?>
140
- <blockquote><pre class="wp-polls-usage-pre">/* background-color: #ffffff; */</pre></blockquote>
141
- </li>
142
- <li>
143
- <?php _e('Replace:', 'wp-polls'); ?>
144
- <blockquote><pre class="wp-polls-usage-pre">background-color: #ffffff;</pre></blockquote>
145
- <?php _e('Where <strong>#ffffff</strong> should be your background color for the poll.', 'wp-polls'); ?>
146
- </li>
147
- </ol>
148
- </li>
149
- </ul>
150
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
polls/tinymce/plugins/polls/editor_plugin.js DELETED
@@ -1,28 +0,0 @@
1
- tinyMCE.importPluginLanguagePack('polls');
2
- var TinyMCE_PollsPlugin = {
3
- getInfo : function() {
4
- return {
5
- longname : 'WP-Polls',
6
- author : 'Lester Chan',
7
- authorurl : 'http://lesterchan.net',
8
- infourl : 'http://lesterchan.net/portfolio/programming.php',
9
- version : "2.21"
10
- };
11
- },
12
- getControlHTML : function(cn) {
13
- switch (cn) {
14
- case "polls":
15
- return tinyMCE.getButtonHTML(cn, 'lang_polls_desc', '{$pluginurl}/images/poll.gif', 'mcePollInsert');
16
- }
17
- return "";
18
- },
19
- execCommand : function(editor_id, element, command, user_interface, value) {
20
- switch (command) {
21
- case "mcePollInsert":
22
- tinyMCE.execInstanceCommand(editor_id, "mceInsertContent", false, insertPoll('visual', ''));
23
- return true;
24
- }
25
- return false;
26
- }
27
- };
28
- tinyMCE.addPlugin("polls", TinyMCE_PollsPlugin);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
polls/tinymce/plugins/polls/langs/en.js DELETED
@@ -1,3 +0,0 @@
1
- tinyMCE.addToLang('polls',{
2
- desc : 'Insert Poll'
3
- });
 
 
 
polls/tinymce/plugins/polls/langs/en_us.js DELETED
@@ -1,3 +0,0 @@
1
- tinyMCE.addToLang('polls',{
2
- desc : 'Insert Poll'
3
- });
 
 
 
polls/wp-polls.mo DELETED
Binary file
readme.html CHANGED
@@ -2,7 +2,7 @@
2
  <html>
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
- <title>WP-Polls 2.21 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.21&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
208
 
209
  <!-- Tabs -->
210
  <ul id="Tabs">
@@ -222,14 +222,8 @@
222
  <div class="SubTitle">&raquo; Index</div>
223
  <div class="SubSubTitle">Plugin Information</div>
224
  <p>
225
- <strong>Author:</strong><br /><strong>&raquo;</strong> Lester 'GaMerZ' Chan</p>
226
- <p>
227
- <strong>EMail:</strong><br /><strong>&raquo;</strong>
228
- <script type="text/javascript">
229
- /* <![CDATA[*/
230
- document.write(' <a href="mailto:gamerz84@hotmail.com?Subject=WP-Polls%202.21%20Support" title="EMail To gamerz84@hotmail.com">gamerz84@hotmail.com</a>');
231
- /* ]]> */
232
- </script>
233
  </p>
234
  <p>
235
  <strong>Website:</strong><br />
@@ -241,10 +235,10 @@
241
  </p>
242
  <p>
243
  <strong>Download:</strong><br />
244
- <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads.php?id=10" title="http://lesterchan.net/others/downloads.php?id=10">WP-Polls 2.21 For WordPress 2.3.x</a><br />
245
- <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads/wp-polls220.zip" title="http://lesterchan.net/others/downloads/wp-polls220.zip">WP-Polls 2.20 For WordPress 2.1.x And 2.2.x</a><br />
246
- <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads/wp-polls213.zip" title="http://lesterchan.net/others/downloads/wp-polls213.zip">WP-Polls 2.13 For WordPress 2.0.x</a><br />
247
- <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads/wp-polls202a.zip" title="http://lesterchan.net/others/downloads/wp-polls202a.zip">WP-Polls 2.02a For WordPress 1.5.2</a>
248
  </p>
249
  <p>
250
  <strong>Screenshots:</strong><br />
@@ -266,27 +260,16 @@
266
  <strong>Support Forums:</strong><br />
267
  <strong>&raquo;</strong> <a href="http://forums.lesterchan.net/index.php?board=15.0" title="http://forums.lesterchan.net/index.php?board=15.0">http://forums.lesterchan.net/index.php?board=15.0</a>
268
  </p>
269
- <p>
270
- <strong>Credits:</strong><br />
271
- <strong>&raquo;</strong> Localization By <a href="http://4visions.nl/" title="http://4visions.nl/">Ravan</a><br />
272
- <strong>&raquo;</strong> Uninstaller By Philippe Corbes
273
- </p>
274
- <p>
275
- <strong>Updated:</strong><br />
276
- <strong>&raquo;</strong> 1st October 2007
277
- </p>
278
  <p>
279
  <strong>Note:</strong><br />
280
  <strong>&raquo;</strong> The <strong>Changelog</strong>, <strong>Installation</strong>, <strong>Upgrade</strong>, <strong>Usage</strong> Tab at the top of the page.<br />
281
- <strong>&raquo;</strong> I have once again change some of the core code to make it work with the future/expired poll. Please post in the support forums if you encounter any bugs.<br />
282
- <strong>&raquo;</strong> WP-Polls has undergo major changes to support multiple answers and AJAX for the backend. Please post in the support forums if you encounter any bugs.
283
  </p>
284
  <p>
285
  <strong>Donations:</strong><br />
286
  <strong>&raquo;</strong> I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks as my school allowance, I will really appericiate it. If not feel free to use it without any obligations. Thank You. My Paypal account is
287
  <script type="text/javascript">
288
  /* <![CDATA[*/
289
- document.write(' <strong>gamerz84@hotmail.com</strong>.');
290
  /* ]]> */
291
  </script>
292
  </p>
@@ -296,6 +279,35 @@
296
  <div id="Changelog" style="display: none;">
297
  <div class="SubTitle">&raquo; Changelog</div>
298
  <ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  <li>
300
  <strong>Version 2.21 (01-10-2007)</strong>
301
  <ul>
@@ -494,7 +506,7 @@
494
  </li>
495
  <li>
496
  Put:
497
- <blockquote>Folder: polls</blockquote>
498
  </li>
499
  <li>
500
  <strong>Activate</strong> WP-Polls Plugin
@@ -508,7 +520,7 @@
508
  <!-- Upgrade Instructions -->
509
  <div id="Upgrade" style="display: none;">
510
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
511
- <div class="SubSubTitle">From v2.xx To v2.21</div>
512
  <ol>
513
  <li>
514
  <strong>Deactivate</strong> WP-Polls Plugin
@@ -518,25 +530,19 @@
518
  </li>
519
  <li>
520
  Put/Overwrite:
521
- <blockquote>Folder: polls</blockquote>
522
  </li>
523
  <li>
524
- Delete these file if exists:
525
  <blockquote>
526
- File: wp-polls.php<br />
527
- File: wp-content/plugins/polls/wp-polls.php<br />
528
- File: wp-content/plugins/polls/polls-js.js<br />
529
- File: wp-content/plugins/polls/images/pollbar.gif<br />
530
- File: wp-content/plugins/polls/images/pollend.gif<br />
531
- File: wp-content/plugins/polls/images/pollstart.gif<br />
532
- File: wp-content/plugins/polls/images/pollbar.gif
533
  </blockquote>
534
  </li>
535
  <li>
536
  <strong>Activate</strong> WP-Polls Plugin
537
  </li>
538
  <li>
539
- Go to '<strong>WP-Admin -> Polls -> Polls Options</strong>' and restore all the template variables to <strong>Default</strong>
540
  </li>
541
  <li>
542
  Refer To <strong>Usage</strong> For Further Instructions
@@ -566,7 +572,8 @@
566
  &lt;?php endif; ?&gt;
567
  </blockquote>
568
  <p>To show specific poll, use &lt;?php get_poll(<strong>2</strong>);?&gt; where <strong>2</strong> is your poll id.</p>
569
- <p>To embed a specific poll in your post, use [poll=<strong>2</strong>] where <strong>2</strong> is your poll id.</p>
 
570
  </li>
571
  <li>
572
  Scroll down for instructions on how to create a <strong>Polls Archive</strong>.
@@ -575,19 +582,19 @@
575
  <div class="SubSubTitle">General Usage (With Widget)</div>
576
  <ol>
577
  <li>
578
- <strong>Activate</strong> WP-Polls Widget Plugin
579
  </li>
580
  <li>
581
- Go to '<strong>WP-Admin -> Presentation -> Widgets</strong>'
582
  </li>
583
  <li>
584
- <strong>Drag</strong> the Polls Widget to your sidebar
585
  </li>
586
  <li>
587
- You can <strong>configure</strong> the Polls Widget by clicking on the configure icon
588
  </li>
589
  <li>
590
- Click 'Save changes'
591
  </li>
592
  <li>
593
  Scroll down for instructions on how to create a <strong>Polls Archive</strong>.
@@ -596,19 +603,22 @@
596
  <div class="SubSubTitle">Polls Archive</div>
597
  <ol>
598
  <li>
599
- Go to '<strong>WP-Admin -> Write -> Write Page</strong>'
 
 
 
600
  </li>
601
  <li>
602
- Type any title you like in the post's title area
603
  </li>
604
  <li>
605
- Type '<strong>[page_polls]</strong>' in the post's content area (without the quotes)
606
  </li>
607
  <li>
608
- Type '<strong>pollsarchive</strong>' in the post's slug area (without the quotes)
609
  </li>
610
  <li>
611
- Click 'Publish'
612
  </li>
613
  <li>
614
  If you <strong>ARE NOT</strong> using nice permalinks, you need to go to 'WP-Admin -> Polls -> Poll Option' and under '<strong>Poll Archive -> Polls Archive URL</strong>', you need to fill in the URL to the Polls Archive Page you created above.
@@ -616,6 +626,13 @@
616
  </ol>
617
  <div class="SubSubTitle">Note</div>
618
  <ul>
 
 
 
 
 
 
 
619
  <li>
620
  In IE, some of the poll's text may appear jagged (this is normal in IE). To solve this issue,
621
  <ol>
@@ -688,6 +705,6 @@
688
  </div>
689
  </div>
690
  </div>
691
- <p id="Copyright">WP-Polls 2.21<br />Copyright &copy; 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
692
  </body>
693
  </html>
2
  <html>
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
+ <title>WP-Polls 2.30 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.30&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
208
 
209
  <!-- Tabs -->
210
  <ul id="Tabs">
222
  <div class="SubTitle">&raquo; Index</div>
223
  <div class="SubSubTitle">Plugin Information</div>
224
  <p>
225
+ <strong>Author:</strong><br />
226
+ <strong>&raquo;</strong> Lester 'GaMerZ' Chan
 
 
 
 
 
 
227
  </p>
228
  <p>
229
  <strong>Website:</strong><br />
235
  </p>
236
  <p>
237
  <strong>Download:</strong><br />
238
+ <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-polls.2.30.zip" title="http://downloads.wordpress.org/plugin/wp-polls.2.30.zip">WP-Polls 2.30 For WordPress 2.5.x</a><br />
239
+ <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 />
240
+ <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-polls.2.13.zip" title="http://downloads.wordpress.org/plugin/wp-polls.2.13.zip">WP-Polls 2.13 For WordPress 2.0.x</a><br />
241
+ <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-polls.2.02a.zip" title="http://downloads.wordpress.org/plugin/wp-polls.2.02a.zip">WP-Polls 2.02a For WordPress 1.5.2</a>
242
  </p>
243
  <p>
244
  <strong>Screenshots:</strong><br />
260
  <strong>Support Forums:</strong><br />
261
  <strong>&raquo;</strong> <a href="http://forums.lesterchan.net/index.php?board=15.0" title="http://forums.lesterchan.net/index.php?board=15.0">http://forums.lesterchan.net/index.php?board=15.0</a>
262
  </p>
 
 
 
 
 
 
 
 
 
263
  <p>
264
  <strong>Note:</strong><br />
265
  <strong>&raquo;</strong> The <strong>Changelog</strong>, <strong>Installation</strong>, <strong>Upgrade</strong>, <strong>Usage</strong> Tab at the top of the page.<br />
 
 
266
  </p>
267
  <p>
268
  <strong>Donations:</strong><br />
269
  <strong>&raquo;</strong> I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks as my school allowance, I will really appericiate it. If not feel free to use it without any obligations. Thank You. My Paypal account is
270
  <script type="text/javascript">
271
  /* <![CDATA[*/
272
+ document.write(' <strong>lesterchan@gmail.com</strong>.');
273
  /* ]]> */
274
  </script>
275
  </p>
279
  <div id="Changelog" style="display: none;">
280
  <div class="SubTitle">&raquo; Changelog</div>
281
  <ul>
282
+ <li>
283
+ <strong>Version 2.30 (01-06-2008)</strong>
284
+ <ul>
285
+ <li>NEW: Works For WordPress 2.5 Only</li>
286
+ <li>NEW: Added Paging Header And Footer Template For Polls Archive Page</li>
287
+ <li>NEW: Uses WP-PageNavi Style Paging For Polls Archive Page</li>
288
+ <li>NEW: WP-Polls Will Load 'polls-css.css' Inside Your Theme Directory If It Exists. If Not, It Will Just Load The Default 'polls-css.css' By WP-Polls</li>
289
+ <li>NEW: Uses Shortcode API</li>
290
+ <li>NEW: When Inserting Poll Into Post, It is Now [poll id="1"], Where 1 Is Your Poll ID</li>
291
+ <li>NEW: When User Does Not Have Permission To Vote, The Voting Form Is Now Disabled Instead Of Showing Poll's Result</li>
292
+ <li>NEW: Added A New Action Called "Display Disabled Poll's Voting Form" To Action Taken When A Poll Is Closed</li>
293
+ <li>NEW: Updated WP-Polls TinyMCE Plugin To Work With TinyMCE 3.0</li>
294
+ <li>NEW: Add Time Expiry For Cookie/Log</li>
295
+ <li>NEW: Removed polls-usage.php</li>
296
+ <li>NEW: Removed "Fade Anything Technique" In Polls Admin</li>
297
+ <li>NEW: Uses /wp-polls/ Folder Instead Of /polls/</li>
298
+ <li>NEW: Uses wp-polls.php Instead Of polls.php</li>
299
+ <li>NEW: Uses wp-polls-widget.php Instead Of polls-widget.php</li>
300
+ <li>NEW: Use number_format_i18n() Instead</li>
301
+ <li>NEW: Renamed polls-admin-js.php To polls-admin-js.js and Move The Dynamic Javascript Variables To The PHP Pages</li>
302
+ <li>NEW: Renamed polls-js.php To polls-js.js and Move The Dynamic Javascript Variables To The PHP Pages</li>
303
+ <li>NEW: Uses polls-js-packed.js And polls-admin-js-packed.js</li>
304
+ <li>FIXED: Unable To Delete Poll Or Poll Answers If There Is Quotes Within The Poll Or Poll Answer</li>
305
+ <li>FIXED: number_format() Not Used In Polls Archive</li>
306
+ <li>FIXED: Unable To Schedule Future Poll If The Year Is Different From Current Year</li>
307
+ <li>FIXED: TinyMCE Tool Tip For Insert Poll Not Translated</li>
308
+ <li>FIXED: Content-Type Not Being Sent Back When AJAX Return Results</li>
309
+ </ul>
310
+ </li>
311
  <li>
312
  <strong>Version 2.21 (01-10-2007)</strong>
313
  <ul>
506
  </li>
507
  <li>
508
  Put:
509
+ <blockquote>Folder: wp-polls</blockquote>
510
  </li>
511
  <li>
512
  <strong>Activate</strong> WP-Polls Plugin
520
  <!-- Upgrade Instructions -->
521
  <div id="Upgrade" style="display: none;">
522
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
523
+ <div class="SubSubTitle">From v2.xx To v2.30</div>
524
  <ol>
525
  <li>
526
  <strong>Deactivate</strong> WP-Polls Plugin
530
  </li>
531
  <li>
532
  Put/Overwrite:
533
+ <blockquote>Folder: wp-polls</blockquote>
534
  </li>
535
  <li>
536
+ Delete this folder if exists:
537
  <blockquote>
538
+ Folder: polls
 
 
 
 
 
 
539
  </blockquote>
540
  </li>
541
  <li>
542
  <strong>Activate</strong> WP-Polls Plugin
543
  </li>
544
  <li>
545
+ Go to '<strong>WP-Admin -> Polls -> Polls Templates</strong>' and restore all the template variables to <strong>Default</strong>
546
  </li>
547
  <li>
548
  Refer To <strong>Usage</strong> For Further Instructions
572
  &lt;?php endif; ?&gt;
573
  </blockquote>
574
  <p>To show specific poll, use &lt;?php get_poll(<strong>2</strong>);?&gt; where <strong>2</strong> is your poll id.</p>
575
+ <p>To embed a specific poll in your post, use [poll id="<strong>2</strong>"] where <strong>2</strong> is your poll id.</p>
576
+ <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>
577
  </li>
578
  <li>
579
  Scroll down for instructions on how to create a <strong>Polls Archive</strong>.
582
  <div class="SubSubTitle">General Usage (With Widget)</div>
583
  <ol>
584
  <li>
585
+ <strong>Activate</strong> WP-Polls Widget Plugin.
586
  </li>
587
  <li>
588
+ Go to '<strong>WP-Admin -> Design -> Widgets</strong>'.
589
  </li>
590
  <li>
591
+ You can <strong>add</strong> the Polls Widget by clicking on the 'Add' link besides it.
592
  </li>
593
  <li>
594
+ After adding, you can <strong>configure</strong> the Polls Widget by clicking on the 'Edit' link besides it.
595
  </li>
596
  <li>
597
+ Click 'Save Changes'.
598
  </li>
599
  <li>
600
  Scroll down for instructions on how to create a <strong>Polls Archive</strong>.
603
  <div class="SubSubTitle">Polls Archive</div>
604
  <ol>
605
  <li>
606
+ Go to '<strong>WP-Admin -> Write -> Page</strong>'.
607
+ </li>
608
+ <li>
609
+ Type any title you like in the post's title area.
610
  </li>
611
  <li>
612
+ After typing the title, WordPress will generate the permalink to the page. You will see an 'Edit' link just beside the permalink.
613
  </li>
614
  <li>
615
+ Click 'Edit' and type in '<strong>pollsarchive</strong>' in the text field (without the quotes) and click 'Save'.
616
  </li>
617
  <li>
618
+ Type '<strong>[page_polls]</strong>' in the post's content area (without the quotes).
619
  </li>
620
  <li>
621
+ Click 'Publish'.
622
  </li>
623
  <li>
624
  If you <strong>ARE NOT</strong> using nice permalinks, you need to go to 'WP-Admin -> Polls -> Poll Option' and under '<strong>Poll Archive -> Polls Archive URL</strong>', you need to fill in the URL to the Polls Archive Page you created above.
626
  </ol>
627
  <div class="SubSubTitle">Note</div>
628
  <ul>
629
+ <li>
630
+ WP-Polls will load '<strong>polls-css.css</strong>' from your theme's directory if it exists.
631
+ <ul>
632
+ <li>If it doesn't exists, it will just load the default 'polls-css.css' that comes with WP-Polls.</li>
633
+ <li>This will allow you to upgrade WP-Polls without worrying about overwriting your polls styles that you have created.</li>
634
+ </ul>
635
+ </li>
636
  <li>
637
  In IE, some of the poll's text may appear jagged (this is normal in IE). To solve this issue,
638
  <ol>
705
  </div>
706
  </div>
707
  </div>
708
+ <p id="Copyright">WP-Polls 2.30<br />Copyright &copy; 2008 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
709
  </body>
710
  </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.3.0
6
- Stable tag: 2.21
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.5.0
6
+ Stable tag: 2.30
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.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.30'
28
+ };
29
+ }
30
+ });
31
+ tinymce.PluginManager.add('polls', tinymce.plugins.PollsPlugin);
32
+ })();
{polls/tinymce/plugins/polls/images → tinymce/plugins/polls/img}/poll.gif RENAMED
File without changes
tinymce/plugins/polls/langs/en.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ tinyMCE.addI18n("en.polls", {
2
+ insert_poll : 'Insert Poll'
3
+ });
polls/polls-widget.php → wp-polls-widget.php RENAMED
@@ -1,16 +1,16 @@
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.21
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
10
 
11
 
12
  /*
13
- Copyright 2007 Lester Chan (email : gamerz84@hotmail.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
@@ -39,7 +39,7 @@ function widget_polls_init() {
39
  global $in_pollsarchive;
40
  extract($args);
41
  $options = get_option('widget_polls');
42
- $title = htmlspecialchars($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) {
@@ -66,7 +66,7 @@ function widget_polls_init() {
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(addslashes($_POST['polls-title']));
70
  if(is_array($_POST['poll_multiplepolls'])) {
71
  $options['multiple_polls'] = implode(',', $_POST['poll_multiplepolls']);
72
  } else {
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.30
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
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) {
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 {
wp-polls.mo ADDED
Binary file
polls/polls.php → wp-polls.php RENAMED
@@ -1,16 +1,16 @@
1
  <?php
2
  /*
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.21
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
10
 
11
 
12
  /*
13
- Copyright 2007 Lester Chan (email : gamerz84@hotmail.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
@@ -37,29 +37,29 @@ if (!function_exists('add_action')) {
37
  ### Create Text Domain For Translations
38
  add_action('init', 'polls_textdomain');
39
  function polls_textdomain() {
40
- load_plugin_textdomain('wp-polls', 'wp-content/plugins/polls');
41
  }
42
 
43
 
44
  ### Polls Table Name
45
- $wpdb->pollsq = $table_prefix.'pollsq';
46
- $wpdb->pollsa = $table_prefix.'pollsa';
47
- $wpdb->pollsip = $table_prefix.'pollsip';
 
48
 
49
 
50
  ### Function: Poll Administration Menu
51
  add_action('admin_menu', 'poll_menu');
52
  function poll_menu() {
53
  if (function_exists('add_menu_page')) {
54
- add_menu_page(__('Polls', 'wp-polls'), __('Polls', 'wp-polls'), 'manage_polls', 'polls/polls-manager.php');
55
  }
56
  if (function_exists('add_submenu_page')) {
57
- add_submenu_page('polls/polls-manager.php', __('Manage Polls', 'wp-polls'), __('Manage Polls', 'wp-polls'), 'manage_polls', 'polls/polls-manager.php');
58
- add_submenu_page('polls/polls-manager.php', __('Add Poll', 'wp-polls'), __('Add Poll', 'wp-polls'), 'manage_polls', 'polls/polls-add.php');
59
- add_submenu_page('polls/polls-manager.php', __('Poll Options', 'wp-polls'), __('Poll Options', 'wp-polls'), 'manage_polls', 'polls/polls-options.php');
60
- add_submenu_page('polls/polls-manager.php', __('Poll Templates', 'wp-polls'), __('Poll Templates', 'wp-polls'), 'manage_polls', 'polls/polls-templates.php');
61
- add_submenu_page('polls/polls-manager.php', __('Poll Usage', 'wp-polls'), __('Poll Usage', 'wp-polls'), 'manage_polls', 'polls/polls-usage.php');
62
- add_submenu_page('polls/polls-manager.php', __('Uninstall WP-Polls', 'wp-polls'), __('Uninstall WP-Polls', 'wp-polls'), 'manage_polls', 'polls/polls-uninstall.php');
63
  }
64
  }
65
 
@@ -130,13 +130,21 @@ function get_poll($temp_poll_id = 0, $display = true) {
130
  } else {
131
  $poll_close = 0;
132
  }
133
- if($check_voted > 0 || ($poll_active == 0 && $poll_close == 1) || !check_allowtovote()) {
134
  if($display) {
135
  echo display_pollresult($poll_id, $check_voted);
136
  return;
137
  } else {
138
  return display_pollresult($poll_id, $check_voted);
139
  }
 
 
 
 
 
 
 
 
140
  } elseif($poll_active == 1) {
141
  if($display) {
142
  echo display_pollvote($poll_id);
@@ -152,12 +160,27 @@ function get_poll($temp_poll_id = 0, $display = true) {
152
  ### Function: Displays Polls Header
153
  add_action('wp_head', 'poll_header');
154
  function poll_header() {
155
- echo "\n".'<!-- Start Of Script Generated By WP-Polls 2.20 -->'."\n";
156
- wp_register_script('wp-polls', '/wp-content/plugins/polls/polls-js.php', false, '2.20');
157
- wp_print_scripts(array('sack', 'wp-polls'));
158
- echo '<link rel="stylesheet" href="'.get_option('siteurl').'/wp-content/plugins/polls/polls-css.css" type="text/css" media="screen" />'."\n";
159
- echo '<style type="text/css">'."\n";
160
  $pollbar = get_option('poll_bar');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  if($pollbar['style'] == 'use_css') {
162
  echo '.wp-polls .pollbar {'."\n";
163
  echo "\t".'margin: 1px;'."\n";
@@ -173,21 +196,39 @@ function poll_header() {
173
  echo "\t".'font-size: '.($pollbar['height']-2).'px;'."\n";
174
  echo "\t".'line-height: '.$pollbar['height'].'px;'."\n";
175
  echo "\t".'height: '.$pollbar['height'].'px;'."\n";
176
- echo "\t".'background-image: url(\''.get_option('siteurl').'/wp-content/plugins/polls/images/'.$pollbar['style'].'/pollbg.gif\');'."\n";
177
  echo "\t".'border: 1px solid #'.$pollbar['border'].';'."\n";
178
  echo '}'."\n";
179
  }
180
  echo '</style>'."\n";
181
- echo '<!-- End Of Script Generated By WP-Polls 2.20 -->'."\n";
182
  }
183
 
184
 
185
  ### Function: Displays Polls Header In WP-Admin
186
  add_action('admin_head', 'poll_header_admin');
187
  function poll_header_admin() {
188
- wp_register_script('wp-polls-admin', '/wp-content/plugins/polls/polls-admin-js.php', false, '2.20');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  wp_print_scripts(array('sack', 'wp-polls-admin'));
190
- echo '<link rel="stylesheet" href="'.get_option('siteurl').'/wp-content/plugins/polls/polls-css.css" type="text/css" media="screen" />'."\n";
 
191
  }
192
 
193
 
@@ -214,21 +255,24 @@ function poll_footer_admin() {
214
  }
215
 
216
 
217
- ### Function: Add Quick Tag For Poll In TinyMCE, Coutesy Of An-Archos (http://an-archos.com/anarchy-media-player)
218
- add_filter('mce_plugins', 'poll_mce_plugins', 5);
219
- function poll_mce_plugins($plugins) {
220
- array_push($plugins, '-polls', 'bold');
221
- return $plugins;
 
 
 
 
 
222
  }
223
- add_filter('mce_buttons', 'poll_mce_buttons', 5);
224
- function poll_mce_buttons($buttons) {
225
  array_push($buttons, 'separator', 'polls');
226
  return $buttons;
227
  }
228
- add_action('tinymce_before_init','poll_external_plugins');
229
- function poll_external_plugins() {
230
- echo 'tinyMCE.loadPlugin("polls", "'.get_option('siteurl').'/wp-content/plugins/polls/tinymce/plugins/polls/");' . "\n";
231
- return;
232
  }
233
 
234
 
@@ -307,8 +351,13 @@ function check_voted_cookie($poll_id) {
307
  ### Function: Check Voted By IP
308
  function check_voted_ip($poll_id) {
309
  global $wpdb;
 
 
 
 
 
310
  // Check IP From IP Logging Database
311
- $get_voted_aids = $wpdb->get_col("SELECT pollip_aid FROM $wpdb->pollsip WHERE pollip_qid = $poll_id AND pollip_ip = '".get_ipaddress()."'");
312
  if($get_voted_aids) {
313
  return $get_voted_aids;
314
  } else {
@@ -325,8 +374,13 @@ function check_voted_username($poll_id) {
325
  return check_voted_ip($poll_id);
326
  }
327
  $pollsip_userid = intval($user_ID);
 
 
 
 
 
328
  // Check User ID From IP Logging Database
329
- $get_voted_aids = $wpdb->get_col("SELECT pollip_aid FROM $wpdb->pollsip WHERE pollip_qid = $poll_id AND pollip_userid = $pollsip_userid");
330
  if($get_voted_aids) {
331
  return $get_voted_aids;
332
  } else {
@@ -347,7 +401,7 @@ function display_pollvote($poll_id, $without_poll_title = false) {
347
  $poll_question_id = intval($poll_question->pollq_id);
348
  $poll_question_totalvotes = intval($poll_question->pollq_totalvotes);
349
  $poll_question_totalvoters = intval($poll_question->pollq_totalvoters);
350
- $poll_start_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_question->pollq_timestamp));
351
  $poll_expiry = trim($poll_question->pollq_expiry);
352
  if(empty($poll_expiry)) {
353
  $poll_end_date = __('No Expiry', 'wp-polls');
@@ -391,7 +445,7 @@ function display_pollvote($poll_id, $without_poll_title = false) {
391
  $template_answer = str_replace("%POLL_ID%", $poll_question_id, $template_answer);
392
  $template_answer = str_replace("%POLL_ANSWER_ID%", $poll_answer_id, $template_answer);
393
  $template_answer = str_replace("%POLL_ANSWER%", $poll_answer_text, $template_answer);
394
- $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format($poll_answer_votes), $template_answer);
395
  if($poll_multiple_ans > 0) {
396
  $template_answer = str_replace("%POLL_CHECKBOX_RADIO%", 'checkbox', $template_answer);
397
  } else {
@@ -428,7 +482,7 @@ function display_pollvote($poll_id, $without_poll_title = false) {
428
  $temp_pollvote .= "</div>\n";
429
  $poll_ajax_style = get_option('poll_ajax_style');
430
  if(intval($poll_ajax_style['loading']) == 1) {
431
- $temp_pollvote .= "<div id=\"polls-$poll_question_id-loading\" class=\"wp-polls-loading\"><img src=\"".get_option('siteurl')."/wp-content/plugins/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";
432
  }
433
  }
434
  } else {
@@ -527,7 +581,7 @@ function display_pollresult($poll_id, $user_voted = '', $without_poll_title = fa
527
  $template_answer = str_replace("%POLL_ANSWER_ID%", $poll_answer_id, $template_answer);
528
  $template_answer = str_replace("%POLL_ANSWER%", $poll_answer_text, $template_answer);
529
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($poll_answer_text)), $template_answer);
530
- $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format($poll_answer_votes), $template_answer);
531
  $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
532
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
533
  // Print Out Results Body Template
@@ -538,7 +592,7 @@ function display_pollresult($poll_id, $user_voted = '', $without_poll_title = fa
538
  $template_answer = str_replace("%POLL_ANSWER_ID%", $poll_answer_id, $template_answer);
539
  $template_answer = str_replace("%POLL_ANSWER%", $poll_answer_text, $template_answer);
540
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($poll_answer_text)), $template_answer);
541
- $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format($poll_answer_votes), $template_answer);
542
  $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
543
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
544
  // Print Out Results Body Template
@@ -569,13 +623,13 @@ function display_pollresult($poll_id, $user_voted = '', $without_poll_title = fa
569
  $template_footer = str_replace("%POLL_START_DATE%", $poll_start_date, $template_footer);
570
  $template_footer = str_replace("%POLL_END_DATE%", $poll_end_date, $template_footer);
571
  $template_footer = str_replace("%POLL_ID%", $poll_question_id, $template_footer);
572
- $template_footer = str_replace("%POLL_TOTALVOTES%", number_format($poll_question_totalvotes), $template_footer);
573
- $template_footer = str_replace("%POLL_TOTALVOTERS%", number_format($poll_question_totalvoters), $template_footer);
574
  $template_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_footer);
575
- $template_footer = str_replace("%POLL_MOST_VOTES%", number_format($poll_most_votes), $template_footer);
576
  $template_footer = str_replace("%POLL_MOST_PERCENTAGE%", $poll_most_percentage, $template_footer);
577
  $template_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_footer);
578
- $template_footer = str_replace("%POLL_LEAST_VOTES%", number_format($poll_least_votes), $template_footer);
579
  $template_footer = str_replace("%POLL_LEAST_PERCENTAGE%", $poll_least_percentage, $template_footer);
580
  if($poll_multiple_ans > 0) {
581
  $template_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $poll_multiple_ans, $template_footer);
@@ -588,7 +642,7 @@ function display_pollresult($poll_id, $user_voted = '', $without_poll_title = fa
588
  $temp_pollresult .= "</div>\n";
589
  $poll_ajax_style = get_option('poll_ajax_style');
590
  if(intval($poll_ajax_style['loading']) == 1) {
591
- $temp_pollresult .= "<div id=\"polls-$poll_question_id-loading\" class=\"wp-polls-loading\"><img src=\"".get_option('siteurl')."/wp-content/plugins/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";
592
  }
593
  }
594
  } else {
@@ -616,30 +670,26 @@ if(!function_exists('get_ipaddress')) {
616
  }
617
 
618
 
619
- ### Function: Place Polls Archive In Content
620
- add_filter('the_content', 'place_pollsarchive', '7');
621
- function place_pollsarchive($content){
622
- $content = preg_replace("/\[page_polls\]/ise", "polls_archive()", $content);
623
- return $content;
624
  }
625
 
626
 
627
- ### Function: Place Poll In Content (By: Robert Accettura Of http://robert.accettura.com/)
628
- add_filter('the_content', 'place_poll', '7');
629
- add_filter('the_excerpt', 'place_poll', '7');
630
- function place_poll($content){
631
  if(!is_feed()) {
632
- $content = preg_replace("/\[poll=(\d+)\]/ise", "display_poll('\\1')", $content);
 
 
 
 
633
  } else {
634
- $content = preg_replace("/\[poll=(\d+)\]/i", __('Note: There is a poll embedded within this post, please visit the site to participate in this post\'s poll.', 'wp-polls'), $content);
635
  }
636
- return $content;
637
- }
638
-
639
-
640
- ### Function: Display The Poll In Content (By: Robert Accettura Of http://robert.accettura.com/)
641
- function display_poll($poll_id){
642
- return get_poll($poll_id, false);
643
  }
644
 
645
 
@@ -649,9 +699,9 @@ if(!function_exists('get_pollquestions')) {
649
  global $wpdb;
650
  $totalpollq = $wpdb->get_var("SELECT COUNT(pollq_id) FROM $wpdb->pollsq");
651
  if($display) {
652
- echo number_format($totalpollq);
653
  } else {
654
- return number_format($totalpollq);
655
  }
656
  }
657
  }
@@ -663,9 +713,9 @@ if(!function_exists('get_pollanswers')) {
663
  global $wpdb;
664
  $totalpolla = $wpdb->get_var("SELECT COUNT(polla_aid) FROM $wpdb->pollsa");
665
  if($display) {
666
- echo number_format($totalpolla);
667
  } else {
668
- return number_format($totalpolla);
669
  }
670
  }
671
  }
@@ -677,9 +727,9 @@ if(!function_exists('get_pollvotes')) {
677
  global $wpdb;
678
  $totalvotes = $wpdb->get_var("SELECT SUM(pollq_totalvotes) FROM $wpdb->pollsq");
679
  if($display) {
680
- echo number_format($totalvotes);
681
  } else {
682
- return number_format($totalvotes);
683
  }
684
  }
685
  }
@@ -691,9 +741,9 @@ if(!function_exists('get_pollvoters')) {
691
  global $wpdb;
692
  $totalvoters = $wpdb->get_var("SELECT SUM(pollq_totalvoters) FROM $wpdb->pollsq");
693
  if($display) {
694
- echo number_format($totalvoters);
695
  } else {
696
- return number_format($totalvoters);
697
  }
698
  }
699
  }
@@ -720,11 +770,9 @@ function check_voted_multiple($poll_id) {
720
 
721
  ### Function: Polls Archive Link
722
  function polls_archive_link($page) {
723
- $current_url = $_SERVER['REQUEST_URI'];
724
- $curren_pollpage = intval($_GET['poll_page']);
725
- $polls_archive_url = preg_replace('/poll_page=(\d+)/i', 'poll_page='.$page, $current_url);
726
- if($curren_pollpage == 0) {
727
- if(strpos($current_url, '?') !== false) {
728
  $polls_archive_url = "$polls_archive_url&amp;poll_page=$page";
729
  } else {
730
  $polls_archive_url = "$polls_archive_url?poll_page=$page";
@@ -780,30 +828,44 @@ function polls_archive() {
780
  // Get Total Polls
781
  $total_polls = $wpdb->get_var("SELECT COUNT(pollq_id) FROM $wpdb->pollsq WHERE $polls_type_sql AND pollq_active != -1");
782
 
783
- // Checking $page and $offset
784
- if (empty($page) || $page == 0) { $page = 1; }
785
- if (empty($offset)) { $offset = 0; }
786
-
787
- // Determin $offset
788
- $offset = ($page-1) * $polls_perpage;
789
-
790
- // Determine Max Number Of Polls To Display On Page
791
- if(($offset + $polls_perpage) > $total_polls) {
792
- $max_on_page = $total_polls;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
793
  } else {
794
- $max_on_page = ($offset + $polls_perpage);
795
  }
796
-
797
- // Determine Number Of Polls To Display On Page
798
- if (($offset + 1) > ($total_polls)) {
799
- $display_on_page = $total_polls;
800
  } else {
801
  $display_on_page = ($offset + 1);
802
  }
803
-
804
- // Determing Total Amount Of Pages
805
- $total_pages = ceil($total_polls / $polls_perpage);
806
-
807
  // Get Poll Questions
808
  $questions = $wpdb->get_results("SELECT * FROM $wpdb->pollsq WHERE $polls_type_sql ORDER BY pollq_id DESC LIMIT $offset, $polls_perpage");
809
  if($questions) {
@@ -849,7 +911,7 @@ function polls_archive() {
849
  if(empty($polls_question['end'])) {
850
  $poll_end_date = __('No Expiry', 'wp-polls');
851
  } else {
852
- $poll_end_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $polls_question['end']));
853
  }
854
  // Archive Poll Header
855
  $template_archive_header = stripslashes(get_option('poll_template_pollarchiveheader'));
@@ -857,8 +919,8 @@ function polls_archive() {
857
  $template_question = stripslashes(get_option('poll_template_resultheader'));
858
  $template_question = str_replace("%POLL_QUESTION%", $polls_question['question'], $template_question);
859
  $template_question = str_replace("%POLL_ID%", $polls_question['id'], $template_question);
860
- $template_question = str_replace("%POLL_TOTALVOTES%", $polls_question['totalvotes'], $template_question);
861
- $template_question = str_replace("%POLL_TOTALVOTERS%", $polls_question['totalvoters'], $template_question);
862
  $template_question = str_replace("%POLL_START_DATE%", $poll_start_date, $template_question);
863
  $template_question = str_replace("%POLL_END_DATE%", $poll_end_date, $template_question);
864
  if($polls_question['multiple'] > 0) {
@@ -891,7 +953,7 @@ function polls_archive() {
891
  $template_answer = str_replace("%POLL_ANSWER_ID%", $polls_answer['aid'], $template_answer);
892
  $template_answer = str_replace("%POLL_ANSWER%", $polls_answer['answers'], $template_answer);
893
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($polls_answer['answers'])), $template_answer);
894
- $template_answer = str_replace("%POLL_ANSWER_VOTES%", $polls_answer['votes'], $template_answer);
895
  $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
896
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
897
  // Print Out Results Body Template
@@ -902,7 +964,7 @@ function polls_archive() {
902
  $template_answer = str_replace("%POLL_ANSWER_ID%", $polls_answer['aid'], $template_answer);
903
  $template_answer = str_replace("%POLL_ANSWER%", $polls_answer['answers'], $template_answer);
904
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($polls_answer['answers'])), $template_answer);
905
- $template_answer = str_replace("%POLL_ANSWER_VOTES%", $polls_answer['votes'], $template_answer);
906
  $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
907
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
908
  // Print Out Results Body Template
@@ -931,13 +993,13 @@ function polls_archive() {
931
  $template_footer = stripslashes(get_option('poll_template_resultfooter'));
932
  $template_footer = str_replace("%POLL_START_DATE%", $poll_start_date, $template_footer);
933
  $template_footer = str_replace("%POLL_END_DATE%", $poll_end_date, $template_footer);
934
- $template_footer = str_replace("%POLL_TOTALVOTES%", $polls_question['totalvotes'], $template_footer);
935
- $template_footer = str_replace("%POLL_TOTALVOTERS%", $polls_question['totalvoters'], $template_footer);
936
  $template_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_footer);
937
- $template_footer = str_replace("%POLL_MOST_VOTES%", number_format($poll_most_votes), $template_footer);
938
  $template_footer = str_replace("%POLL_MOST_PERCENTAGE%", $poll_most_percentage, $template_footer);
939
  $template_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_footer);
940
- $template_footer = str_replace("%POLL_LEAST_VOTES%", number_format($poll_least_votes), $template_footer);
941
  $template_footer = str_replace("%POLL_LEAST_PERCENTAGE%", $poll_least_percentage, $template_footer);
942
  if($polls_question['multiple'] > 0) {
943
  $template_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $polls_question['multiple'], $template_footer);
@@ -948,13 +1010,13 @@ function polls_archive() {
948
  $template_archive_footer = stripslashes(get_option('poll_template_pollarchivefooter'));
949
  $template_archive_footer = str_replace("%POLL_START_DATE%", $poll_start_date, $template_archive_footer);
950
  $template_archive_footer = str_replace("%POLL_END_DATE%", $poll_end_date, $template_archive_footer);
951
- $template_archive_footer = str_replace("%POLL_TOTALVOTES%", $polls_question['totalvotes'], $template_archive_footer);
952
- $template_archive_footer = str_replace("%POLL_TOTALVOTERS%", $polls_question['totalvoters'], $template_archive_footer);
953
  $template_archive_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_archive_footer);
954
- $template_archive_footer = str_replace("%POLL_MOST_VOTES%", number_format($poll_most_votes), $template_archive_footer);
955
  $template_archive_footer = str_replace("%POLL_MOST_PERCENTAGE%", $poll_most_percentage, $template_archive_footer);
956
  $template_archive_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_archive_footer);
957
- $template_archive_footer = str_replace("%POLL_LEAST_VOTES%", number_format($poll_least_votes), $template_archive_footer);
958
  $template_archive_footer = str_replace("%POLL_LEAST_PERCENTAGE%", $poll_least_percentage, $template_archive_footer);
959
  if($polls_question['multiple'] > 0) {
960
  $template_archive_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $polls_question['multiple'], $template_archive_footer);
@@ -969,51 +1031,37 @@ function polls_archive() {
969
  $pollsarchive_output_archive .= "</div>\n";
970
 
971
  // Polls Archive Paging
972
- if($total_pages > 1) {
973
- // Output Previous Page
974
- $pollsarchive_output_archive .= "<p>\n";
975
- $pollsarchive_output_archive .= "<span style=\"float: left;\">\n";
976
- if($page > 1 && ((($page*$polls_perpage)-($polls_perpage-1)) <= $total_polls)) {
977
- $pollsarchive_output_archive .= '<strong>&laquo;</strong> <a href="'.polls_archive_link($page-1).'" title="&laquo; '.__('Previous Page', 'wp-polls').'">'.__('Previous Page', 'wp-polls').'</a>';
978
  } else {
979
- $pollsarchive_output_archive .= '&nbsp;';
980
- }
981
- $pollsarchive_output_archive .= "</span>\n";
982
- // Output Next Page
983
- $pollsarchive_output_archive .= "<span style=\"float: right;\">\n";
984
- if($page >= 1 && ((($page*$polls_perpage)+1) <= $total_polls)) {
985
- $pollsarchive_output_archive .= '<a href="'.polls_archive_link($page+1).'" title="'.__('Next Page', 'wp-polls').' &raquo;">'.__('Next Page', 'wp-polls').'</a> <strong>&raquo;</strong>';
986
- } else {
987
- $pollsarchive_output_archive .= '&nbsp;';
988
  }
989
- $pollsarchive_output_archive .= "</span>\n";
990
- // Output Pages
991
- $pollsarchive_output_archive .= "</p>\n";
992
- $pollsarchive_output_archive .= "<br style=\"clear: both;\" />\n";
993
- $pollsarchive_output_archive .= "<p style=\"text-align: center;\">\n";
994
- $pollsarchive_output_archive .= __('Pages', 'wp-polls')." ($total_pages): ";
995
- if ($page >= 4) {
996
- $pollsarchive_output_archive .= '<strong><a href="'.polls_archive_link(1).'" title="'.__('Go to First Page', 'wp-polls').'">&laquo; '.__('First', 'wp-polls').'</a></strong> ... ';
997
  }
998
  if($page > 1) {
999
- $pollsarchive_output_archive .= ' <strong><a href="'.polls_archive_link($page-1).'" title="&laquo; '.__('Go to Page', 'wp-polls').' '.($page-1).'">&laquo;</a></strong> ';
1000
  }
1001
- for($i = $page - 2 ; $i <= $page +2; $i++) {
1002
- if ($i >= 1 && $i <= $total_pages) {
1003
- if($i == $page) {
1004
- $pollsarchive_output_archive .= "<strong>[$i]</strong> ";
1005
- } else {
1006
- $pollsarchive_output_archive .= '<a href="'.polls_archive_link($i).'" title="'.__('Page', 'wp-polls').' '.$i.'">'.$i.'</a> ';
1007
- }
1008
  }
1009
  }
1010
- if($page < $total_pages) {
1011
- $pollsarchive_output_archive .= ' <strong><a href="'.polls_archive_link($page+1).'" title="'.__('Go to Page', 'wp-polls').' '.($page+1).' &raquo;">&raquo;</a></strong> ';
1012
  }
1013
- if (($page+2) < $total_pages) {
1014
- $pollsarchive_output_archive .= ' ... <strong><a href="'.polls_archive_link($total_pages).'" title="'.__('Go to Last Page', 'wp-polls').'">'.__('Last', 'wp-polls').' &raquo;</a></strong>';
 
1015
  }
1016
- $pollsarchive_output_archive .= "</p>\n";
 
1017
  }
1018
 
1019
  // Output Polls Archive Page
@@ -1052,7 +1100,7 @@ function poll_timestamp($poll_timestamp, $fieldname = 'pollq_timestamp', $displa
1052
  echo '</select>&nbsp;&nbsp;'."\n";
1053
  $year = gmdate('Y', $poll_timestamp);
1054
  echo '<select name="'.$fieldname.'_year" size="1">'."\n";
1055
- for($i = 2000; $i <= $year; $i++) {
1056
  if($year == $i) {
1057
  echo "<option value=\"$i\" selected=\"selected\">$i</option>\n";
1058
  } else {
@@ -1171,12 +1219,16 @@ function vote_poll() {
1171
  // Only Create Cookie If User Choose Logging Method 1 Or 2
1172
  $poll_logging_method = intval(get_option('poll_logging_method'));
1173
  if($poll_logging_method == 1 || $poll_logging_method == 3) {
1174
- $vote_cookie = setcookie("voted_".$poll_id, $poll_aid, time() + 30000000, COOKIEPATH);
 
 
 
 
1175
  }
1176
  foreach($poll_aid_array as $polla_aid) {
1177
  $wpdb->query("UPDATE $wpdb->pollsa SET polla_votes = (polla_votes+1) WHERE polla_qid = $poll_id AND polla_aid = $polla_aid");
1178
  }
1179
- $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");
1180
  if($vote_q) {
1181
  foreach($poll_aid_array as $polla_aid) {
1182
  $wpdb->query("INSERT INTO $wpdb->pollsip VALUES (0, $poll_id, $polla_aid, '$pollip_ip', '$pollip_host', '$pollip_timestamp', '$pollip_user', $pollip_userid)");
@@ -1196,10 +1248,12 @@ function vote_poll() {
1196
  exit();
1197
  } // End if($poll_id > 0 && $poll_aid > 0)
1198
  } elseif (intval($_GET['pollresult']) > 0) {
 
1199
  $poll_id = intval($_GET['pollresult']);
1200
  echo "<ul class=\"wp-polls-ul\">\n".display_pollresult($poll_id, 0, true);
1201
  exit();
1202
  } elseif (intval($_GET['pollbooth']) > 0) {
 
1203
  $poll_id = intval($_GET['pollbooth']);
1204
  echo "<ul class=\"wp-polls-ul\">\n".display_pollvote($poll_id, true);
1205
  exit();
@@ -1208,7 +1262,7 @@ function vote_poll() {
1208
 
1209
 
1210
  ### Function: Plug Into WP-Stats
1211
- if(strpos(get_option('stats_url'), $_SERVER['REQUEST_URI']) || strpos($_SERVER['REQUEST_URI'], 'stats-options.php') || strpos($_SERVER['REQUEST_URI'], 'stats/stats.php')) {
1212
  add_filter('wp_stats_page_admin_plugins', 'polls_page_admin_general_stats');
1213
  add_filter('wp_stats_page_plugins', 'polls_page_general_stats');
1214
  }
@@ -1242,7 +1296,7 @@ function polls_page_general_stats($content) {
1242
 
1243
 
1244
  ### Function: Create Poll Tables
1245
- add_action('activate_polls/polls.php', 'create_poll_table');
1246
  function create_poll_table() {
1247
  global $wpdb;
1248
  if(@is_file(ABSPATH.'/wp-admin/upgrade-functions.php')) {
@@ -1354,6 +1408,10 @@ function create_poll_table() {
1354
  if($pollq_totalvoters) {
1355
  $wpdb->query("UPDATE $wpdb->pollsq SET pollq_totalvoters = pollq_totalvotes");
1356
  }
 
 
 
 
1357
  // Set 'manage_polls' Capabilities To Administrator
1358
  $role = get_role('administrator');
1359
  if(!$role->has_cap('manage_polls')) {
1
  <?php
2
  /*
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.30
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
37
  ### Create Text Domain For Translations
38
  add_action('init', 'polls_textdomain');
39
  function polls_textdomain() {
40
+ load_plugin_textdomain('wp-polls', 'wp-content/plugins/wp-polls');
41
  }
42
 
43
 
44
  ### Polls Table Name
45
+ global $wpdb;
46
+ $wpdb->pollsq = $wpdb->prefix.'pollsq';
47
+ $wpdb->pollsa = $wpdb->prefix.'pollsa';
48
+ $wpdb->pollsip = $wpdb->prefix.'pollsip';
49
 
50
 
51
  ### Function: Poll Administration Menu
52
  add_action('admin_menu', 'poll_menu');
53
  function poll_menu() {
54
  if (function_exists('add_menu_page')) {
55
+ add_menu_page(__('Polls', 'wp-polls'), __('Polls', 'wp-polls'), 'manage_polls', 'wp-polls/polls-manager.php');
56
  }
57
  if (function_exists('add_submenu_page')) {
58
+ add_submenu_page('wp-polls/polls-manager.php', __('Manage Polls', 'wp-polls'), __('Manage Polls', 'wp-polls'), 'manage_polls', 'wp-polls/polls-manager.php');
59
+ add_submenu_page('wp-polls/polls-manager.php', __('Add Poll', 'wp-polls'), __('Add Poll', 'wp-polls'), 'manage_polls', 'wp-polls/polls-add.php');
60
+ add_submenu_page('wp-polls/polls-manager.php', __('Poll Options', 'wp-polls'), __('Poll Options', 'wp-polls'), 'manage_polls', 'wp-polls/polls-options.php');
61
+ add_submenu_page('wp-polls/polls-manager.php', __('Poll Templates', 'wp-polls'), __('Poll Templates', 'wp-polls'), 'manage_polls', 'wp-polls/polls-templates.php');
62
+ add_submenu_page('wp-polls/polls-manager.php', __('Uninstall WP-Polls', 'wp-polls'), __('Uninstall WP-Polls', 'wp-polls'), 'manage_polls', 'wp-polls/polls-uninstall.php');
 
63
  }
64
  }
65
 
130
  } else {
131
  $poll_close = 0;
132
  }
133
+ if($check_voted > 0 || ($poll_active == 0 && $poll_close == 1)) {
134
  if($display) {
135
  echo display_pollresult($poll_id, $check_voted);
136
  return;
137
  } else {
138
  return display_pollresult($poll_id, $check_voted);
139
  }
140
+ } elseif(!check_allowtovote() || ($poll_active == 0 && $poll_close == 3)) {
141
+ $disable_poll_js = '<script type="text/javascript">poll_disable_voting('.$poll_id.');</script>';
142
+ if($display) {
143
+ echo display_pollvote($poll_id).$disable_poll_js;
144
+ return;
145
+ } else {
146
+ return display_pollvote($poll_id).$disable_poll_js;
147
+ }
148
  } elseif($poll_active == 1) {
149
  if($display) {
150
  echo display_pollvote($poll_id);
160
  ### Function: Displays Polls Header
161
  add_action('wp_head', 'poll_header');
162
  function poll_header() {
163
+ $poll_ajax_style = get_option('poll_ajax_style');
 
 
 
 
164
  $pollbar = get_option('poll_bar');
165
+ wp_register_script('wp-polls', '/wp-content/plugins/wp-polls/polls-js-packed.js', false, '2.30');
166
+ echo "\n".'<!-- Start Of Script Generated By WP-Polls 2.30 -->'."\n";
167
+ echo '<script type="text/javascript">'."\n";
168
+ echo '/* <![CDATA[ */'."\n";
169
+ echo "\t".'var polls_ajax_url = \''.get_option('siteurl').'/wp-content/plugins/wp-polls/wp-polls.php'."';\n";
170
+ echo "\t".'var polls_text_wait = \''.js_escape(__('Your last request is still being processed. Please wait a while ...', 'wp-polls')).'\';'."\n";
171
+ echo "\t".'var polls_text_valid = \''.js_escape(__('Please choose a valid poll answer.', 'wp-polls')).'\';'."\n";
172
+ echo "\t".'var polls_text_multiple = \''.js_escape(__('Maximum number of choices allowed:', 'wp-polls')).'\';'."\n";
173
+ echo "\t".'var poll_show_loading = '.intval($poll_ajax_style['loading']).';'."\n";
174
+ echo "\t".'var poll_show_fading = '.intval($poll_ajax_style['fading']).';'."\n";
175
+ echo '/* ]]> */'."\n";
176
+ echo '</script>'."\n";
177
+ wp_print_scripts(array('sack', 'wp-polls'));
178
+ if(@file_exists(TEMPLATEPATH.'/polls-css.css')) {
179
+ echo '<link rel="stylesheet" href="'.get_stylesheet_directory_uri().'/polls-css.css" type="text/css" media="screen" />'."\n";
180
+ } else {
181
+ echo '<link rel="stylesheet" href="'.get_option('siteurl').'/wp-content/plugins/wp-polls/polls-css.css" type="text/css" media="screen" />'."\n";
182
+ }
183
+ echo '<style type="text/css">'."\n";
184
  if($pollbar['style'] == 'use_css') {
185
  echo '.wp-polls .pollbar {'."\n";
186
  echo "\t".'margin: 1px;'."\n";
196
  echo "\t".'font-size: '.($pollbar['height']-2).'px;'."\n";
197
  echo "\t".'line-height: '.$pollbar['height'].'px;'."\n";
198
  echo "\t".'height: '.$pollbar['height'].'px;'."\n";
199
+ echo "\t".'background-image: url(\''.get_option('siteurl').'/wp-content/plugins/wp-polls/images/'.$pollbar['style'].'/pollbg.gif\');'."\n";
200
  echo "\t".'border: 1px solid #'.$pollbar['border'].';'."\n";
201
  echo '}'."\n";
202
  }
203
  echo '</style>'."\n";
204
+ echo '<!-- End Of Script Generated By WP-Polls 2.30 -->'."\n";
205
  }
206
 
207
 
208
  ### Function: Displays Polls Header In WP-Admin
209
  add_action('admin_head', 'poll_header_admin');
210
  function poll_header_admin() {
211
+ wp_register_script('wp-polls-admin', '/wp-content/plugins/wp-polls/polls-admin-js-packed.js', false, '2.30');
212
+ echo "\n".'<!-- Start Of Script Generated By WP-Polls 2.30 -->'."\n";
213
+ echo '<script type="text/javascript">'."\n";
214
+ echo '/* <![CDATA[ */'."\n";
215
+ echo "\t".'var polls_admin_ajax_url = \''.get_option('siteurl').'/wp-content/plugins/wp-polls/polls-admin-ajax.php'."';\n";
216
+ echo "\t".'var polls_admin_text_delete_poll = \''.js_escape(__('Delete Poll', 'wp-polls')).'\';'."\n";
217
+ echo "\t".'var polls_admin_text_no_poll_logs = \''.js_escape(__('No poll logs available.', 'wp-polls')).'\';'."\n";
218
+ echo "\t".'var polls_admin_text_delete_all_logs = \''.js_escape(__('Delete All Logs', 'wp-polls')).'\';'."\n";
219
+ 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";
220
+ echo "\t".'var polls_admin_text_delete_poll_logs = \''.js_escape(__('Delete Logs For This Poll Only', 'wp-polls')).'\';'."\n";
221
+ 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";
222
+ echo "\t".'var polls_admin_text_delete_poll_ans = \''.js_escape(__('Delete Poll Answer', 'wp-polls')).'\';'."\n";
223
+ echo "\t".'var polls_admin_text_open_poll = \''.js_escape(__('Open Poll', 'wp-polls')).'\';'."\n";
224
+ echo "\t".'var polls_admin_text_close_poll = \''.js_escape(__('Close Poll', 'wp-polls')).'\';'."\n";
225
+ echo "\t".'var polls_admin_text_enter_poll_id = \''.js_escape(__('Enter Poll ID', 'wp-polls')).'\';'."\n";
226
+ 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";
227
+ echo '/* ]]> */'."\n";
228
+ echo '</script>'."\n";
229
  wp_print_scripts(array('sack', 'wp-polls-admin'));
230
+ echo '<link rel="stylesheet" href="'.get_option('siteurl').'/wp-content/plugins/wp-polls/polls-css.css" type="text/css" media="screen" />'."\n";
231
+ echo '<!-- End Of Script Generated By WP-Polls 2.30 -->'."\n";
232
  }
233
 
234
 
255
  }
256
 
257
 
258
+ ### Function: Add Quick Tag For Poll In TinyMCE >= WordPress 2.5
259
+ add_action('init', 'poll_tinymce_addbuttons');
260
+ function poll_tinymce_addbuttons() {
261
+ if(!current_user_can('edit_posts') && ! current_user_can('edit_pages')) {
262
+ return;
263
+ }
264
+ if(get_user_option('rich_editing') == 'true') {
265
+ add_filter("mce_external_plugins", "poll_tinymce_addplugin");
266
+ add_filter('mce_buttons', 'poll_tinymce_registerbutton');
267
+ }
268
  }
269
+ function poll_tinymce_registerbutton($buttons) {
 
270
  array_push($buttons, 'separator', 'polls');
271
  return $buttons;
272
  }
273
+ function poll_tinymce_addplugin($plugin_array) {
274
+ $plugin_array['polls'] = get_option('siteurl').'/wp-content/plugins/wp-polls/tinymce/plugins/polls/editor_plugin.js';
275
+ return $plugin_array;
 
276
  }
277
 
278
 
351
  ### Function: Check Voted By IP
352
  function check_voted_ip($poll_id) {
353
  global $wpdb;
354
+ $log_expiry = intval(get_option('poll_cookielog_expiry'));
355
+ $log_expiry_sql = '';
356
+ if($log_expiry > 0) {
357
+ $log_expiry_sql = 'AND ('.current_time('timestamp').'-(pollip_timestamp+0)) < '.$log_expiry;
358
+ }
359
  // Check IP From IP Logging Database
360
+ $get_voted_aids = $wpdb->get_col("SELECT pollip_aid FROM $wpdb->pollsip WHERE pollip_qid = $poll_id AND pollip_ip = '".get_ipaddress()."' $log_expiry_sql");
361
  if($get_voted_aids) {
362
  return $get_voted_aids;
363
  } else {
374
  return check_voted_ip($poll_id);
375
  }
376
  $pollsip_userid = intval($user_ID);
377
+ $log_expiry = intval(get_option('poll_cookielog_expiry'));
378
+ $log_expiry_sql = '';
379
+ if($log_expiry > 0) {
380
+ $log_expiry_sql = 'AND ('.current_time('timestamp').'-(pollip_timestamp+0)) < '.$log_expiry;
381
+ }
382
  // Check User ID From IP Logging Database
383
+ $get_voted_aids = $wpdb->get_col("SELECT pollip_aid FROM $wpdb->pollsip WHERE pollip_qid = $poll_id AND pollip_userid = $pollsip_userid $log_expiry_sql");
384
  if($get_voted_aids) {
385
  return $get_voted_aids;
386
  } else {
401
  $poll_question_id = intval($poll_question->pollq_id);
402
  $poll_question_totalvotes = intval($poll_question->pollq_totalvotes);
403
  $poll_question_totalvoters = intval($poll_question->pollq_totalvoters);
404
+ $poll_start_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_question->pollq_timestamp));
405
  $poll_expiry = trim($poll_question->pollq_expiry);
406
  if(empty($poll_expiry)) {
407
  $poll_end_date = __('No Expiry', 'wp-polls');
445
  $template_answer = str_replace("%POLL_ID%", $poll_question_id, $template_answer);
446
  $template_answer = str_replace("%POLL_ANSWER_ID%", $poll_answer_id, $template_answer);
447
  $template_answer = str_replace("%POLL_ANSWER%", $poll_answer_text, $template_answer);
448
+ $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($poll_answer_votes), $template_answer);
449
  if($poll_multiple_ans > 0) {
450
  $template_answer = str_replace("%POLL_CHECKBOX_RADIO%", 'checkbox', $template_answer);
451
  } else {
482
  $temp_pollvote .= "</div>\n";
483
  $poll_ajax_style = get_option('poll_ajax_style');
484
  if(intval($poll_ajax_style['loading']) == 1) {
485
+ $temp_pollvote .= "<div id=\"polls-$poll_question_id-loading\" class=\"wp-polls-loading\"><img src=\"".get_option('siteurl')."/wp-content/plugins/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";
486
  }
487
  }
488
  } else {
581
  $template_answer = str_replace("%POLL_ANSWER_ID%", $poll_answer_id, $template_answer);
582
  $template_answer = str_replace("%POLL_ANSWER%", $poll_answer_text, $template_answer);
583
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($poll_answer_text)), $template_answer);
584
+ $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($poll_answer_votes), $template_answer);
585
  $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
586
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
587
  // Print Out Results Body Template
592
  $template_answer = str_replace("%POLL_ANSWER_ID%", $poll_answer_id, $template_answer);
593
  $template_answer = str_replace("%POLL_ANSWER%", $poll_answer_text, $template_answer);
594
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($poll_answer_text)), $template_answer);
595
+ $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($poll_answer_votes), $template_answer);
596
  $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
597
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
598
  // Print Out Results Body Template
623
  $template_footer = str_replace("%POLL_START_DATE%", $poll_start_date, $template_footer);
624
  $template_footer = str_replace("%POLL_END_DATE%", $poll_end_date, $template_footer);
625
  $template_footer = str_replace("%POLL_ID%", $poll_question_id, $template_footer);
626
+ $template_footer = str_replace("%POLL_TOTALVOTES%", number_format_i18n($poll_question_totalvotes), $template_footer);
627
+ $template_footer = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($poll_question_totalvoters), $template_footer);
628
  $template_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_footer);
629
+ $template_footer = str_replace("%POLL_MOST_VOTES%", number_format_i18n($poll_most_votes), $template_footer);
630
  $template_footer = str_replace("%POLL_MOST_PERCENTAGE%", $poll_most_percentage, $template_footer);
631
  $template_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_footer);
632
+ $template_footer = str_replace("%POLL_LEAST_VOTES%", number_format_i18n($poll_least_votes), $template_footer);
633
  $template_footer = str_replace("%POLL_LEAST_PERCENTAGE%", $poll_least_percentage, $template_footer);
634
  if($poll_multiple_ans > 0) {
635
  $template_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $poll_multiple_ans, $template_footer);
642
  $temp_pollresult .= "</div>\n";
643
  $poll_ajax_style = get_option('poll_ajax_style');
644
  if(intval($poll_ajax_style['loading']) == 1) {
645
+ $temp_pollresult .= "<div id=\"polls-$poll_question_id-loading\" class=\"wp-polls-loading\"><img src=\"".get_option('siteurl')."/wp-content/plugins/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";
646
  }
647
  }
648
  } else {
670
  }
671
 
672
 
673
+ ### Function: Short Code For Inserting Polls Archive Into Page
674
+ add_shortcode('page_polls', 'poll_page_shortcode');
675
+ function poll_page_shortcode($atts) {
676
+ return polls_archive();
 
677
  }
678
 
679
 
680
+ ### Function: Short Code For Inserting Polls Into Posts
681
+ add_shortcode('poll', 'poll_shortcode');
682
+ function poll_shortcode($atts) {
683
+ extract(shortcode_atts(array('id' => 0, 'type' => 'vote'), $atts));
684
  if(!is_feed()) {
685
+ if($type == 'vote') {
686
+ return get_poll($id, false);
687
+ } elseif($type == 'result') {
688
+ return display_pollresult($id);
689
+ }
690
  } else {
691
+ return __('Note: There is a poll embedded within this post, please visit the site to participate in this post\'s poll.', 'wp-polls');
692
  }
 
 
 
 
 
 
 
693
  }
694
 
695
 
699
  global $wpdb;
700
  $totalpollq = $wpdb->get_var("SELECT COUNT(pollq_id) FROM $wpdb->pollsq");
701
  if($display) {
702
+ echo number_format_i18n($totalpollq);
703
  } else {
704
+ return number_format_i18n($totalpollq);
705
  }
706
  }
707
  }
713
  global $wpdb;
714
  $totalpolla = $wpdb->get_var("SELECT COUNT(polla_aid) FROM $wpdb->pollsa");
715
  if($display) {
716
+ echo number_format_i18n($totalpolla);
717
  } else {
718
+ return number_format_i18n($totalpolla);
719
  }
720
  }
721
  }
727
  global $wpdb;
728
  $totalvotes = $wpdb->get_var("SELECT SUM(pollq_totalvotes) FROM $wpdb->pollsq");
729
  if($display) {
730
+ echo number_format_i18n($totalvotes);
731
  } else {
732
+ return number_format_i18n($totalvotes);
733
  }
734
  }
735
  }
741
  global $wpdb;
742
  $totalvoters = $wpdb->get_var("SELECT SUM(pollq_totalvoters) FROM $wpdb->pollsq");
743
  if($display) {
744
+ echo number_format_i18n($totalvoters);
745
  } else {
746
+ return number_format_i18n($totalvoters);
747
  }
748
  }
749
  }
770
 
771
  ### Function: Polls Archive Link
772
  function polls_archive_link($page) {
773
+ $polls_archive_url = get_option('poll_archive_url');
774
+ if($page > 0) {
775
+ if(strpos($polls_archive_url, '?') !== false) {
 
 
776
  $polls_archive_url = "$polls_archive_url&amp;poll_page=$page";
777
  } else {
778
  $polls_archive_url = "$polls_archive_url?poll_page=$page";
828
  // Get Total Polls
829
  $total_polls = $wpdb->get_var("SELECT COUNT(pollq_id) FROM $wpdb->pollsq WHERE $polls_type_sql AND pollq_active != -1");
830
 
831
+ // Calculate Paging
832
+ $numposts = $total_polls;
833
+ $perpage = $polls_perpage;
834
+ $max_page = ceil($numposts/$perpage);
835
+ if(empty($page) || $page == 0) {
836
+ $page = 1;
837
+ }
838
+ $offset = ($page-1) * $perpage;
839
+ $pages_to_show = 10;
840
+ $pages_to_show_minus_1 = $pages_to_show-1;
841
+ $half_page_start = floor($pages_to_show_minus_1/2);
842
+ $half_page_end = ceil($pages_to_show_minus_1/2);
843
+ $start_page = $page - $half_page_start;
844
+ if($start_page <= 0) {
845
+ $start_page = 1;
846
+ }
847
+ $end_page = $page + $half_page_end;
848
+ if(($end_page - $start_page) != $pages_to_show_minus_1) {
849
+ $end_page = $start_page + $pages_to_show_minus_1;
850
+ }
851
+ if($end_page > $max_page) {
852
+ $start_page = $max_page - $pages_to_show_minus_1;
853
+ $end_page = $max_page;
854
+ }
855
+ if($start_page <= 0) {
856
+ $start_page = 1;
857
+ }
858
+ if(($offset + $perpage) > $numposts) {
859
+ $max_on_page = $numposts;
860
  } else {
861
+ $max_on_page = ($offset + $perpage);
862
  }
863
+ if (($offset + 1) > ($numposts)) {
864
+ $display_on_page = $numposts;
 
 
865
  } else {
866
  $display_on_page = ($offset + 1);
867
  }
868
+
 
 
 
869
  // Get Poll Questions
870
  $questions = $wpdb->get_results("SELECT * FROM $wpdb->pollsq WHERE $polls_type_sql ORDER BY pollq_id DESC LIMIT $offset, $polls_perpage");
871
  if($questions) {
911
  if(empty($polls_question['end'])) {
912
  $poll_end_date = __('No Expiry', 'wp-polls');
913
  } else {
914
+ $poll_end_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $polls_question['end']));
915
  }
916
  // Archive Poll Header
917
  $template_archive_header = stripslashes(get_option('poll_template_pollarchiveheader'));
919
  $template_question = stripslashes(get_option('poll_template_resultheader'));
920
  $template_question = str_replace("%POLL_QUESTION%", $polls_question['question'], $template_question);
921
  $template_question = str_replace("%POLL_ID%", $polls_question['id'], $template_question);
922
+ $template_question = str_replace("%POLL_TOTALVOTES%", number_format_i18n($polls_question['totalvotes']), $template_question);
923
+ $template_question = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($polls_question['totalvoters']), $template_question);
924
  $template_question = str_replace("%POLL_START_DATE%", $poll_start_date, $template_question);
925
  $template_question = str_replace("%POLL_END_DATE%", $poll_end_date, $template_question);
926
  if($polls_question['multiple'] > 0) {
953
  $template_answer = str_replace("%POLL_ANSWER_ID%", $polls_answer['aid'], $template_answer);
954
  $template_answer = str_replace("%POLL_ANSWER%", $polls_answer['answers'], $template_answer);
955
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($polls_answer['answers'])), $template_answer);
956
+ $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($polls_answer['votes']), $template_answer);
957
  $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
958
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
959
  // Print Out Results Body Template
964
  $template_answer = str_replace("%POLL_ANSWER_ID%", $polls_answer['aid'], $template_answer);
965
  $template_answer = str_replace("%POLL_ANSWER%", $polls_answer['answers'], $template_answer);
966
  $template_answer = str_replace("%POLL_ANSWER_TEXT%", htmlspecialchars(strip_tags($polls_answer['answers'])), $template_answer);
967
+ $template_answer = str_replace("%POLL_ANSWER_VOTES%", number_format_i18n($polls_answer['votes']), $template_answer);
968
  $template_answer = str_replace("%POLL_ANSWER_PERCENTAGE%", $poll_answer_percentage, $template_answer);
969
  $template_answer = str_replace("%POLL_ANSWER_IMAGEWIDTH%", $poll_answer_imagewidth, $template_answer);
970
  // Print Out Results Body Template
993
  $template_footer = stripslashes(get_option('poll_template_resultfooter'));
994
  $template_footer = str_replace("%POLL_START_DATE%", $poll_start_date, $template_footer);
995
  $template_footer = str_replace("%POLL_END_DATE%", $poll_end_date, $template_footer);
996
+ $template_footer = str_replace("%POLL_TOTALVOTES%", number_format_i18n($polls_question['totalvotes']), $template_footer);
997
+ $template_footer = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($polls_question['totalvoters']), $template_footer);
998
  $template_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_footer);
999
+ $template_footer = str_replace("%POLL_MOST_VOTES%", number_format_i18n($poll_most_votes), $template_footer);
1000
  $template_footer = str_replace("%POLL_MOST_PERCENTAGE%", $poll_most_percentage, $template_footer);
1001
  $template_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_footer);
1002
+ $template_footer = str_replace("%POLL_LEAST_VOTES%", number_format_i18n($poll_least_votes), $template_footer);
1003
  $template_footer = str_replace("%POLL_LEAST_PERCENTAGE%", $poll_least_percentage, $template_footer);
1004
  if($polls_question['multiple'] > 0) {
1005
  $template_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $polls_question['multiple'], $template_footer);
1010
  $template_archive_footer = stripslashes(get_option('poll_template_pollarchivefooter'));
1011
  $template_archive_footer = str_replace("%POLL_START_DATE%", $poll_start_date, $template_archive_footer);
1012
  $template_archive_footer = str_replace("%POLL_END_DATE%", $poll_end_date, $template_archive_footer);
1013
+ $template_archive_footer = str_replace("%POLL_TOTALVOTES%", number_format_i18n($polls_question['totalvotes']), $template_archive_footer);
1014
+ $template_archive_footer = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($polls_question['totalvoters']), $template_archive_footer);
1015
  $template_archive_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_archive_footer);
1016
+ $template_archive_footer = str_replace("%POLL_MOST_VOTES%", number_format_i18n($poll_most_votes), $template_archive_footer);
1017
  $template_archive_footer = str_replace("%POLL_MOST_PERCENTAGE%", $poll_most_percentage, $template_archive_footer);
1018
  $template_archive_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_archive_footer);
1019
+ $template_archive_footer = str_replace("%POLL_LEAST_VOTES%", number_format_i18n($poll_least_votes), $template_archive_footer);
1020
  $template_archive_footer = str_replace("%POLL_LEAST_PERCENTAGE%", $poll_least_percentage, $template_archive_footer);
1021
  if($polls_question['multiple'] > 0) {
1022
  $template_archive_footer = str_replace("%POLL_MULTIPLE_ANS_MAX%", $polls_question['multiple'], $template_archive_footer);
1031
  $pollsarchive_output_archive .= "</div>\n";
1032
 
1033
  // Polls Archive Paging
1034
+ if($max_page > 1) {
1035
+ $pollsarchive_output_archive .= stripslashes(get_option('poll_template_pollarchivepagingheader'));
1036
+ if(function_exists('wp_pagenavi')) {
1037
+ $pollsarchive_output_archive .= '<div class="wp-pagenavi">'."\n";
 
 
1038
  } else {
1039
+ $pollsarchive_output_archive .= '<div class="wp-polls-paging">'."\n";
 
 
 
 
 
 
 
 
1040
  }
1041
+ $pollsarchive_output_archive .= '<span class="pages">'.sprintf(__('Page %s of %s', 'wp-polls'), $page, $max_page).'</span>';
1042
+ if ($start_page >= 2 && $pages_to_show < $max_page) {
1043
+ $pollsarchive_output_archive .= '<a href="'.polls_archive_link(1).'" title="'.__('&laquo; First', 'wp-polls').'">'.__('&laquo; First', 'wp-polls').'</a>';
1044
+ $pollsarchive_output_archive .= '<span class="extend">...</span>';
 
 
 
 
1045
  }
1046
  if($page > 1) {
1047
+ $pollsarchive_output_archive .= '<a href="'.polls_archive_link(($page-1)).'" title="'.__('&laquo;', 'wp-polls').'">'.__('&laquo;', 'wp-polls').'</a>';
1048
  }
1049
+ for($i = $start_page; $i <= $end_page; $i++) {
1050
+ if($i == $page) {
1051
+ $pollsarchive_output_archive .= '<span class="current">'.$i.'</span>';
1052
+ } else {
1053
+ $pollsarchive_output_archive .= '<a href="'.polls_archive_link($i).'" title="'.$i.'">'.$i.'</a>';
 
 
1054
  }
1055
  }
1056
+ if(empty($page) || ($page+1) <= $max_page) {
1057
+ $pollsarchive_output_archive .= '<a href="'.polls_archive_link(($page+1)).'" title="'.__('&raquo;', 'wp-polls').'">'.__('&raquo;', 'wp-polls').'</a>';
1058
  }
1059
+ if ($end_page < $max_page) {
1060
+ $pollsarchive_output_archive .= '<span class="extend">...</span>';
1061
+ $pollsarchive_output_archive .= '<a href="'.polls_archive_link($max_page).'" title="'.__('Last &raquo;', 'wp-polls').'">'.__('Last &raquo;', 'wp-polls').'</a>';
1062
  }
1063
+ $pollsarchive_output_archive .= '</div>';
1064
+ $pollsarchive_output_archive .= stripslashes(get_option('poll_template_pollarchivepagingfooter'));
1065
  }
1066
 
1067
  // Output Polls Archive Page
1100
  echo '</select>&nbsp;&nbsp;'."\n";
1101
  $year = gmdate('Y', $poll_timestamp);
1102
  echo '<select name="'.$fieldname.'_year" size="1">'."\n";
1103
+ for($i = 2000; $i <= ($year+10); $i++) {
1104
  if($year == $i) {
1105
  echo "<option value=\"$i\" selected=\"selected\">$i</option>\n";
1106
  } else {
1219
  // Only Create Cookie If User Choose Logging Method 1 Or 2
1220
  $poll_logging_method = intval(get_option('poll_logging_method'));
1221
  if($poll_logging_method == 1 || $poll_logging_method == 3) {
1222
+ $cookie_expiry = intval(get_option('poll_cookielog_expiry'));
1223
+ if($cookie_expiry == 0) {
1224
+ $cookie_expiry = 30000000;
1225
+ }
1226
+ $vote_cookie = setcookie("voted_".$poll_id, $poll_aid, ($pollip_timestamp + $cookie_expiry), COOKIEPATH);
1227
  }
1228
  foreach($poll_aid_array as $polla_aid) {
1229
  $wpdb->query("UPDATE $wpdb->pollsa SET polla_votes = (polla_votes+1) WHERE polla_qid = $poll_id AND polla_aid = $polla_aid");
1230
  }
1231
+ $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");
1232
  if($vote_q) {
1233
  foreach($poll_aid_array as $polla_aid) {
1234
  $wpdb->query("INSERT INTO $wpdb->pollsip VALUES (0, $poll_id, $polla_aid, '$pollip_ip', '$pollip_host', '$pollip_timestamp', '$pollip_user', $pollip_userid)");
1248
  exit();
1249
  } // End if($poll_id > 0 && $poll_aid > 0)
1250
  } elseif (intval($_GET['pollresult']) > 0) {
1251
+ header('Content-Type: text/html; charset='.get_option('blog_charset').'');
1252
  $poll_id = intval($_GET['pollresult']);
1253
  echo "<ul class=\"wp-polls-ul\">\n".display_pollresult($poll_id, 0, true);
1254
  exit();
1255
  } elseif (intval($_GET['pollbooth']) > 0) {
1256
+ header('Content-Type: text/html; charset='.get_option('blog_charset').'');
1257
  $poll_id = intval($_GET['pollbooth']);
1258
  echo "<ul class=\"wp-polls-ul\">\n".display_pollvote($poll_id, true);
1259
  exit();
1262
 
1263
 
1264
  ### Function: Plug Into WP-Stats
1265
+ if(strpos(get_option('stats_url'), $_SERVER['REQUEST_URI']) || strpos($_SERVER['REQUEST_URI'], 'stats-options.php') || strpos($_SERVER['REQUEST_URI'], 'wp-stats/wp-stats.php')) {
1266
  add_filter('wp_stats_page_admin_plugins', 'polls_page_admin_general_stats');
1267
  add_filter('wp_stats_page_plugins', 'polls_page_general_stats');
1268
  }
1296
 
1297
 
1298
  ### Function: Create Poll Tables
1299
+ add_action('activate_wp-polls/wp-polls.php', 'create_poll_table');
1300
  function create_poll_table() {
1301
  global $wpdb;
1302
  if(@is_file(ABSPATH.'/wp-admin/upgrade-functions.php')) {
1408
  if($pollq_totalvoters) {
1409
  $wpdb->query("UPDATE $wpdb->pollsq SET pollq_totalvoters = pollq_totalvotes");
1410
  }
1411
+ // Database Upgrade For WP-Polls 2.30
1412
+ add_option('poll_cookielog_expiry', 0, 'Cookie And Log Expiry Time');
1413
+ add_option('poll_template_pollarchivepagingheader', '', 'Displayed Before Paging In The Poll Archive');
1414
+ add_option('poll_template_pollarchivepagingfooter', '', 'Displayed After Paging In The Poll Archive');
1415
  // Set 'manage_polls' Capabilities To Administrator
1416
  $role = get_role('administrator');
1417
  if(!$role->has_cap('manage_polls')) {
polls/wp-polls.pot → wp-polls.pot RENAMED
@@ -1,12 +1,13 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WP-Polls 2.21\n"
4
- "POT-Creation-Date: \n"
5
- "PO-Revision-Date: 2007-09-30 16:05+0800\n"
6
- "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n"
7
- "Language-Team: Ravan <ravanhagen@gmail.com>\n"
 
8
  "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
  "X-Poedit-Country: SINGAPORE\n"
12
  "X-Poedit-KeywordsList: __;_e\n"
@@ -16,8 +17,8 @@ msgstr ""
16
 
17
  #: polls-add.php:36
18
  #: polls-add.php:174
19
- #: polls-add.php:246
20
- #: polls.php:58
21
  msgid "Add Poll"
22
  msgstr ""
23
 
@@ -37,9 +38,15 @@ msgstr ""
37
  msgid "Poll '%s' Added Successfully."
38
  msgstr ""
39
 
 
 
 
 
 
 
40
  #: polls-add.php:124
41
- #: polls-logs.php:291
42
- #: polls-logs.php:334
43
  #: polls-manager.php:237
44
  msgid "Answer"
45
  msgstr ""
@@ -49,99 +56,103 @@ msgid "You need at least a minimum of 2 poll answers."
49
  msgstr ""
50
 
51
  #: polls-add.php:176
52
- #: polls-manager.php:307
53
  msgid "Poll Question"
54
  msgstr ""
55
 
56
  #: polls-add.php:179
57
- msgid "Question:"
 
 
58
  msgstr ""
59
 
60
  #: polls-add.php:184
61
- #: polls-manager.php:315
62
  msgid "Poll Answers"
63
  msgstr ""
64
 
65
  #: polls-add.php:189
66
- #: polls-manager.php:355
67
  msgid "Add Answer"
68
  msgstr ""
69
 
70
  #: polls-add.php:189
71
- #: polls-manager.php:355
72
  msgid "Remove Answer"
73
  msgstr ""
74
 
75
- #: polls-add.php:201
76
- #: polls-manager.php:342
77
  #, php-format
78
- msgid "Answer %s:"
79
  msgstr ""
80
 
81
- #: polls-add.php:210
82
- #: polls-manager.php:366
83
  msgid "Poll Multiple Answers"
84
  msgstr ""
85
 
86
- #: polls-add.php:213
87
- #: polls-manager.php:369
88
  msgid "Allows Users To Select More Than One Answer?"
89
  msgstr ""
90
 
91
- #: polls-add.php:216
92
- #: polls-manager.php:372
93
- #: polls-options.php:201
94
- #: polls-options.php:210
95
- #: polls-options.php:323
96
- #: polls-widget.php:105
97
  msgid "No"
98
  msgstr ""
99
 
100
- #: polls-add.php:217
101
- #: polls-logs.php:381
102
- #: polls-manager.php:373
103
- #: polls-manager.php:589
104
- #: polls-options.php:202
105
- #: polls-options.php:211
106
- #: polls-options.php:324
107
- #: polls-uninstall.php:130
108
- #: polls-widget.php:110
109
  msgid "Yes"
110
  msgstr ""
111
 
112
- #: polls-add.php:222
113
- #: polls-manager.php:378
114
  msgid "Maximum Number Of Selected Answers Allowed?"
115
  msgstr ""
116
 
117
- #: polls-add.php:235
118
- #: polls-manager.php:395
119
  msgid "Poll Start/End Date"
120
  msgstr ""
121
 
122
- #: polls-add.php:238
123
- msgid "Start Date/Time:"
 
 
124
  msgstr ""
125
 
126
- #: polls-add.php:242
127
- msgid "End Date/Time:"
 
 
128
  msgstr ""
129
 
130
- #: polls-add.php:243
131
- #: polls-manager.php:417
132
  msgid "Do NOT Expire This Poll"
133
  msgstr ""
134
 
135
- #: polls-add.php:246
136
- #: polls-manager.php:443
137
- #: polls-options.php:381
138
- #: polls-templates.php:464
139
  msgid "Cancel"
140
  msgstr ""
141
 
142
  #: polls-admin-ajax.php:38
143
- #: polls-admin-js.php:78
144
- #: polls-manager.php:590
145
  msgid "Delete All Logs"
146
  msgstr ""
147
 
@@ -154,8 +165,8 @@ msgid "An Error Has Occured While Deleting All Polls Logs."
154
  msgstr ""
155
 
156
  #: polls-admin-ajax.php:49
157
- #: polls-admin-js.php:106
158
- #: polls-logs.php:382
159
  msgid "Delete Logs For This Poll Only"
160
  msgstr ""
161
 
@@ -170,7 +181,7 @@ msgid "An Error Has Occured While Deleting All Logs For '%s'"
170
  msgstr ""
171
 
172
  #: polls-admin-ajax.php:62
173
- #: polls-admin-js.php:148
174
  msgid "Delete Poll Answer"
175
  msgstr ""
176
 
@@ -185,8 +196,8 @@ msgid "Error In Deleting Poll Answer '%s'."
185
  msgstr ""
186
 
187
  #: polls-admin-ajax.php:78
188
- #: polls-admin-js.php:172
189
- #: polls-manager.php:442
190
  msgid "Open Poll"
191
  msgstr ""
192
 
@@ -201,8 +212,8 @@ msgid "Error Opening Poll '%s'"
201
  msgstr ""
202
 
203
  #: polls-admin-ajax.php:89
204
- #: polls-admin-js.php:195
205
- #: polls-manager.php:441
206
  msgid "Close Poll"
207
  msgstr ""
208
 
@@ -217,7 +228,7 @@ msgid "Error Closing Poll '%s'"
217
  msgstr ""
218
 
219
  #: polls-admin-ajax.php:100
220
- #: polls-admin-js.php:56
221
  msgid "Delete Poll"
222
  msgstr ""
223
 
@@ -231,49 +242,6 @@ msgstr ""
231
  msgid "Poll '%s' Deleted Successfully"
232
  msgstr ""
233
 
234
- #: polls-admin-js.php:69
235
- #: polls-manager.php:593
236
- msgid "No poll logs available."
237
- msgstr ""
238
-
239
- #: polls-admin-js.php:85
240
- msgid "Please check the 'Yes' checkbox if you want to delete all logs."
241
- msgstr ""
242
-
243
- #: polls-admin-js.php:94
244
- #: polls-logs.php:371
245
- #: polls-logs.php:385
246
- msgid "No poll logs available for this poll."
247
- msgstr ""
248
-
249
- #: polls-admin-js.php:114
250
- msgid "Please check the 'Yes' checkbox if you want to delete all logs for this poll ONLY."
251
- msgstr ""
252
-
253
- #: polls-admin-js.php:206
254
- msgid "Enter Poll ID"
255
- msgstr ""
256
-
257
- #: polls-admin-js.php:208
258
- msgid "Error: Poll ID must be numeric"
259
- msgstr ""
260
-
261
- #: polls-admin-js.php:208
262
- msgid "Please enter Poll ID again"
263
- msgstr ""
264
-
265
- #: polls-js.php:36
266
- msgid "Your last request is still being processed. Please wait a while ..."
267
- msgstr ""
268
-
269
- #: polls-js.php:37
270
- msgid "Please choose a valid poll answer."
271
- msgstr ""
272
-
273
- #: polls-js.php:38
274
- msgid "Maximum number of choices allowed:"
275
- msgstr ""
276
-
277
  #: polls-logs.php:33
278
  #: polls-logs.php:34
279
  #: polls-logs.php:37
@@ -312,160 +280,165 @@ msgstr ""
312
  msgid "Filter Poll's Logs"
313
  msgstr ""
314
 
315
- #: polls-logs.php:143
316
- msgid "Display All Users That Voted For:"
317
  msgstr ""
318
 
319
- #: polls-logs.php:166
320
- #: polls-logs.php:217
321
  msgid "Voters To EXCLUDE"
322
  msgstr ""
323
 
324
- #: polls-logs.php:169
325
- #: polls-logs.php:220
326
  msgid "Registered Users"
327
  msgstr ""
328
 
329
- #: polls-logs.php:170
330
- #: polls-logs.php:221
331
  msgid "Comment Authors"
332
  msgstr ""
333
 
334
- #: polls-logs.php:171
335
  msgid "Guests"
336
  msgstr ""
337
 
338
- #: polls-logs.php:175
339
- #: polls-logs.php:226
340
- #: polls-logs.php:262
341
  msgid "Filter"
342
  msgstr ""
343
 
344
- #: polls-logs.php:187
345
- msgid "Display Users That Voted For: "
346
  msgstr ""
347
 
348
- #: polls-logs.php:191
349
  msgid "More Than"
350
  msgstr ""
351
 
352
- #: polls-logs.php:192
353
  msgid "More Than Or Exactly"
354
  msgstr ""
355
 
356
- #: polls-logs.php:193
357
  msgid "Exactly"
358
  msgstr ""
359
 
360
- #: polls-logs.php:194
361
  msgid "Less Than Or Exactly"
362
  msgstr ""
363
 
364
- #: polls-logs.php:195
365
  msgid "Less Than"
366
  msgstr ""
367
 
368
- #: polls-logs.php:202
369
  msgid "1 Answer"
370
  msgstr ""
371
 
372
- #: polls-logs.php:205
373
- #: polls-logs.php:207
374
  #, php-format
375
  msgid "%s Answers"
376
  msgstr ""
377
 
378
- #: polls-logs.php:222
379
  msgid "Guests will automatically be excluded"
380
  msgstr ""
381
 
382
- #: polls-logs.php:243
383
- msgid "Display What This User Has Voted:"
384
  msgstr ""
385
 
386
- #: polls-logs.php:271
387
  msgid "Clear Filter"
388
  msgstr ""
389
 
390
- #: polls-logs.php:278
391
  msgid "Poll Logs"
392
  msgstr ""
393
 
394
- #: polls-logs.php:283
395
  msgid "This default filter is limited to display only <strong>100</strong> records."
396
  msgstr ""
397
 
398
- #: polls-logs.php:292
399
  msgid "IP"
400
  msgstr ""
401
 
402
- #: polls-logs.php:293
403
  msgid "Host"
404
  msgstr ""
405
 
406
- #: polls-logs.php:294
407
- #: polls-logs.php:341
408
  msgid "Date"
409
  msgstr ""
410
 
411
- #: polls-logs.php:301
412
- #: polls-logs.php:329
413
- #: polls-manager.php:400
414
- #: polls-manager.php:412
415
- #: polls-manager.php:489
416
- #: polls-manager.php:497
417
- #: polls.php:350
418
- #: polls.php:355
419
- #: polls.php:466
420
- #: polls.php:471
421
- #: polls.php:848
422
- #: polls.php:852
423
  #, php-format
424
  msgid "%s @ %s"
425
  msgstr ""
426
 
427
- #: polls-logs.php:309
428
- #: polls-logs.php:339
429
  msgid "User"
430
  msgstr ""
431
 
432
- #: polls-logs.php:338
433
  msgid "No."
434
  msgstr ""
435
 
436
- #: polls-logs.php:340
437
  msgid "IP/Host"
438
  msgstr ""
439
 
440
- #: polls-logs.php:362
441
  #, php-format
442
  msgid "Total number of records that matches this filter: <strong>%s</strong>"
443
  msgstr ""
444
 
445
- #: polls-logs.php:369
446
  msgid "No poll logs matches the filter."
447
  msgstr ""
448
 
449
- #: polls-logs.php:377
 
 
 
 
 
450
  msgid "Delete Poll Logs"
451
  msgstr ""
452
 
453
- #: polls-logs.php:380
454
  msgid "Are You Sure You Want To Delete Logs For This Poll Only?"
455
  msgstr ""
456
 
457
- #: polls-logs.php:382
458
  #, php-format
459
  msgid "You are about to delete poll logs for this poll '%s' ONLY. This action is not reversible."
460
  msgstr ""
461
 
462
- #: polls-logs.php:389
463
  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."
464
  msgstr ""
465
 
466
  #: polls-manager.php:39
467
- #: polls-manager.php:305
468
- #: polls-manager.php:431
469
  msgid "Edit Poll"
470
  msgstr ""
471
 
@@ -499,811 +472,838 @@ msgstr ""
499
  msgid "Poll '%s' Edited Successfully."
500
  msgstr ""
501
 
502
- #: polls-manager.php:278
503
  msgid "No more poll's answer to be removed."
504
  msgstr ""
505
 
506
- #: polls-manager.php:310
507
- #: polls-manager.php:466
508
- msgid "Question"
509
- msgstr ""
510
-
511
- #: polls-manager.php:319
512
- msgid "Answer No.:"
513
  msgstr ""
514
 
515
- #: polls-manager.php:320
516
- msgid "Answer Text:"
517
  msgstr ""
518
 
519
- #: polls-manager.php:321
520
  msgid "No. Of Votes"
521
  msgstr ""
522
 
523
- #: polls-manager.php:330
524
  msgid "Null Votes"
525
  msgstr ""
526
 
527
- #: polls-manager.php:344
528
- #: polls-manager.php:544
529
  msgid "Delete"
530
  msgstr ""
531
 
532
- #: polls-manager.php:344
533
  #, php-format
534
  msgid "You are about to delete this poll's answer '%s'."
535
  msgstr ""
536
 
537
- #: polls-manager.php:356
538
  msgid "Total Votes:"
539
  msgstr ""
540
 
541
- #: polls-manager.php:361
542
- #: polls-manager.php:575
543
  msgid "Total Voters:"
544
  msgstr ""
545
 
546
  #: polls-manager.php:398
547
- #: polls-manager.php:468
548
- msgid "Start Date/Time"
549
- msgstr ""
550
-
551
- #: polls-manager.php:401
552
  msgid "Edit Start Date/Time"
553
  msgstr ""
554
 
555
- #: polls-manager.php:406
556
- #: polls-manager.php:469
557
- msgid "End Date/Time"
558
- msgstr ""
559
-
560
- #: polls-manager.php:410
561
  msgid "This Poll Will Not Expire"
562
  msgstr ""
563
 
564
- #: polls-manager.php:441
565
  #, php-format
566
  msgid "You are about to CLOSE this poll '%s'."
567
  msgstr ""
568
 
569
- #: polls-manager.php:442
570
  #, php-format
571
  msgid "You are about to OPEN this poll '%s'."
572
  msgstr ""
573
 
574
- #: polls-manager.php:461
575
- #: polls.php:57
576
- msgid "Manage Polls"
577
- msgstr ""
578
-
579
- #: polls-manager.php:465
580
  msgid "ID"
581
  msgstr ""
582
 
583
- #: polls-manager.php:467
584
- #: polls-templates.php:116
585
- #: polls-templates.php:119
586
- #: polls.php:1316
587
- #: polls.php:1319
 
588
  msgid "Total Voters"
589
  msgstr ""
590
 
591
- #: polls-manager.php:470
592
  msgid "Status"
593
  msgstr ""
594
 
595
- #: polls-manager.php:471
596
  msgid "Action"
597
  msgstr ""
598
 
599
- #: polls-manager.php:495
600
- #: polls.php:353
601
- #: polls.php:469
602
- #: polls.php:850
603
  msgid "No Expiry"
604
  msgstr ""
605
 
606
- #: polls-manager.php:520
607
- #: polls-manager.php:524
608
- #: polls-manager.php:527
609
  msgid "Displayed:"
610
  msgstr ""
611
 
612
- #: polls-manager.php:535
613
  msgid "Open"
614
  msgstr ""
615
 
616
- #: polls-manager.php:537
617
  msgid "Future"
618
  msgstr ""
619
 
620
- #: polls-manager.php:539
621
  msgid "Closed"
622
  msgstr ""
623
 
624
- #: polls-manager.php:542
625
  msgid "Logs"
626
  msgstr ""
627
 
628
- #: polls-manager.php:543
629
  msgid "Edit"
630
  msgstr ""
631
 
632
- #: polls-manager.php:544
633
  #, php-format
634
  msgid "You are about to delete this poll, '%s'."
635
  msgstr ""
636
 
637
- #: polls-manager.php:552
638
  msgid "No Polls Found"
639
  msgstr ""
640
 
641
  #: polls-manager.php:560
642
- #: polls-usage.php:103
643
  msgid "Polls Stats"
644
  msgstr ""
645
 
646
- #: polls-manager.php:563
647
- msgid "Total Polls:"
648
  msgstr ""
649
 
650
- #: polls-manager.php:567
651
- msgid "Total Polls' Answers:"
652
  msgstr ""
653
 
654
- #: polls-manager.php:571
655
- msgid "Total Votes Casted:"
656
  msgstr ""
657
 
658
- #: polls-manager.php:582
659
  msgid "Polls Logs"
660
  msgstr ""
661
 
662
- #: polls-manager.php:588
663
  msgid "Are You Sure You Want To Delete All Polls Logs?"
664
  msgstr ""
665
 
666
- #: polls-manager.php:590
667
  msgid "You are about to delete all poll logs. This action is not reversible."
668
  msgstr ""
669
 
670
  #: polls-manager.php:597
 
 
 
 
 
671
  msgid "Note:<br />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."
672
  msgstr ""
673
 
674
- #: polls-options.php:68
675
- #: polls-options.php:133
676
  #: polls-options.php:136
 
677
  msgid "Poll Bar Style"
678
  msgstr ""
679
 
680
- #: polls-options.php:69
681
  msgid "Poll AJAX Style"
682
  msgstr ""
683
 
684
- #: polls-options.php:70
685
  msgid "Sort Poll Answers By Option"
686
  msgstr ""
687
 
688
- #: polls-options.php:71
689
  msgid "Sort Order Of Poll Answers Option"
690
  msgstr ""
691
 
692
- #: polls-options.php:72
693
  msgid "Sort Poll Results By Option"
694
  msgstr ""
695
 
696
- #: polls-options.php:73
697
  msgid "Sort Order Of Poll Results Option"
698
  msgstr ""
699
 
700
- #: polls-options.php:74
701
  msgid "Number Of Polls Per Page To Display In Poll Archive Option"
702
  msgstr ""
703
 
704
- #: polls-options.php:75
705
  msgid "Type Of Polls To Display In Poll Archive Option"
706
  msgstr ""
707
 
708
- #: polls-options.php:76
709
  msgid "Poll Archive URL Option"
710
  msgstr ""
711
 
712
- #: polls-options.php:77
713
  msgid "Show Poll Achive Link Option"
714
  msgstr ""
715
 
716
- #: polls-options.php:78
717
  msgid "Current Active Poll Option"
718
  msgstr ""
719
 
720
- #: polls-options.php:79
721
  msgid "Poll Close Option"
722
  msgstr ""
723
 
724
- #: polls-options.php:80
725
- #: polls-options.php:282
726
  msgid "Logging Method"
727
  msgstr ""
728
 
729
- #: polls-options.php:81
 
 
 
 
730
  msgid "Allow To Vote Option"
731
  msgstr ""
732
 
733
- #: polls-options.php:86
734
- #: polls-templates.php:79
735
  msgid "Updated"
736
  msgstr ""
737
 
738
- #: polls-options.php:91
739
- #: polls-templates.php:84
740
  msgid "No Poll Option Updated"
741
  msgstr ""
742
 
743
- #: polls-options.php:131
744
- #: polls.php:59
745
  msgid "Poll Options"
746
  msgstr ""
747
 
748
- #: polls-options.php:162
749
  msgid "Use CSS Style"
750
  msgstr ""
751
 
752
- #: polls-options.php:166
753
  msgid "Poll Bar Background"
754
  msgstr ""
755
 
756
- #: polls-options.php:171
757
  msgid "Poll Bar Border"
758
  msgstr ""
759
 
760
- #: polls-options.php:176
761
  msgid "Poll Bar Height"
762
  msgstr ""
763
 
764
- #: polls-options.php:180
765
  msgid "Your poll bar will look like this"
766
  msgstr ""
767
 
768
- #: polls-options.php:195
769
  msgid "Polls AJAX Style"
770
  msgstr ""
771
 
772
- #: polls-options.php:198
773
  msgid "Show Loading Image With Text"
774
  msgstr ""
775
 
776
- #: polls-options.php:207
777
  msgid "Show Fading In And Fading Out Of Poll"
778
  msgstr ""
779
 
780
- #: polls-options.php:218
781
  msgid "Sorting Of Poll Answers"
782
  msgstr ""
783
 
784
- #: polls-options.php:221
785
  msgid "Sort Poll Answers By:"
786
  msgstr ""
787
 
788
- #: polls-options.php:224
789
- #: polls-options.php:249
790
  msgid "Exact Order"
791
  msgstr ""
792
 
793
- #: polls-options.php:225
794
- #: polls-options.php:250
795
  msgid "Alphabetical Order"
796
  msgstr ""
797
 
798
- #: polls-options.php:226
799
- #: polls-options.php:251
800
  msgid "Random Order"
801
  msgstr ""
802
 
803
- #: polls-options.php:231
804
  msgid "Sort Order Of Poll Answers:"
805
  msgstr ""
806
 
807
- #: polls-options.php:234
808
- #: polls-options.php:259
809
  msgid "Ascending"
810
  msgstr ""
811
 
812
- #: polls-options.php:235
813
- #: polls-options.php:260
814
  msgid "Descending"
815
  msgstr ""
816
 
817
- #: polls-options.php:242
818
  msgid "Sorting Of Poll Results"
819
  msgstr ""
820
 
821
- #: polls-options.php:245
822
  msgid "Sort Poll Results By:"
823
  msgstr ""
824
 
825
- #: polls-options.php:248
826
- #: polls-templates.php:110
827
- #: polls-templates.php:113
828
- #: polls.php:1313
829
- #: polls.php:1314
830
  msgid "Votes"
831
  msgstr ""
832
 
833
- #: polls-options.php:256
834
  msgid "Sort Order Of Poll Results:"
835
  msgstr ""
836
 
837
- #: polls-options.php:267
838
  msgid "Allow To Vote"
839
  msgstr ""
840
 
841
- #: polls-options.php:270
842
  msgid "Who Is Allowed To Vote?"
843
  msgstr ""
844
 
845
- #: polls-options.php:273
846
  msgid "Guests Only"
847
  msgstr ""
848
 
849
- #: polls-options.php:274
850
  msgid "Registered Users Only"
851
  msgstr ""
852
 
853
- #: polls-options.php:275
854
  msgid "Registered Users And Guests"
855
  msgstr ""
856
 
857
- #: polls-options.php:285
858
  msgid "Poll Logging Method:"
859
  msgstr ""
860
 
861
- #: polls-options.php:288
862
  msgid "Do Not Log"
863
  msgstr ""
864
 
865
- #: polls-options.php:289
866
  msgid "Logged By Cookie"
867
  msgstr ""
868
 
869
- #: polls-options.php:290
870
  msgid "Logged By IP"
871
  msgstr ""
872
 
873
- #: polls-options.php:291
874
  msgid "Logged By Cookie And IP"
875
  msgstr ""
876
 
877
- #: polls-options.php:292
878
  msgid "Logged By Username"
879
  msgstr ""
880
 
881
- #: polls-options.php:299
 
 
 
 
 
 
 
 
882
  msgid "Poll Archive"
883
  msgstr ""
884
 
885
- #: polls-options.php:302
886
  msgid "Number Of Polls Per Page:"
887
  msgstr ""
888
 
889
- #: polls-options.php:306
890
  msgid "Type Of Polls To Display In Poll Archive:"
891
  msgstr ""
892
 
893
- #: polls-options.php:309
894
  msgid "Closed Polls Only"
895
  msgstr ""
896
 
897
- #: polls-options.php:310
898
  msgid "Opened Polls Only"
899
  msgstr ""
900
 
901
- #: polls-options.php:311
902
  msgid "Closed And Opened Polls"
903
  msgstr ""
904
 
905
- #: polls-options.php:316
906
  msgid "Poll Archive URL:"
907
  msgstr ""
908
 
909
- #: polls-options.php:320
910
  msgid "Display Poll Archive Link Below Poll?"
911
  msgstr ""
912
 
913
- #: polls-options.php:329
914
- msgid "Note: Only polls' results will be shown in the Poll Archive regardless of whether the poll is closed or opened."
 
915
  msgstr ""
916
 
917
- #: polls-options.php:334
918
  #: polls-options.php:337
919
- #: polls-widget.php:114
 
 
 
 
 
920
  msgid "Current Active Poll"
921
  msgstr ""
922
 
923
- #: polls-options.php:340
924
- #: polls-widget.php:120
925
  msgid "Do NOT Display Poll (Disable)"
926
  msgstr ""
927
 
928
- #: polls-options.php:341
929
- #: polls-widget.php:125
930
  msgid "Display Random Poll"
931
  msgstr ""
932
 
933
- #: polls-options.php:342
934
- #: polls-widget.php:130
935
  msgid "Display Latest Poll"
936
  msgstr ""
937
 
938
- #: polls-options.php:344
939
- #: polls-widget.php:135
940
  msgid "Display Multiple Polls"
941
  msgstr ""
942
 
943
- #: polls-options.php:366
944
- msgid "Note: If you chose 'Display Multiple Polls' for the above option, you need to configure it in Presentation -> Widgets -> Poll."
945
  msgstr ""
946
 
947
- #: polls-options.php:370
948
  msgid "When Poll Is Closed"
949
  msgstr ""
950
 
951
- #: polls-options.php:373
952
  msgid "Display Poll's Results"
953
  msgstr ""
954
 
955
- #: polls-options.php:374
 
 
 
 
956
  msgid "Do Not Display Poll In Post/Sidebar"
957
  msgstr ""
958
 
959
- #: polls-options.php:381
960
- msgid "Update Options"
 
961
  msgstr ""
962
 
963
- #: polls-templates.php:62
964
  msgid "Voting Form Header Template"
965
  msgstr ""
966
 
967
- #: polls-templates.php:63
968
  msgid "Voting Form Body Template"
969
  msgstr ""
970
 
971
- #: polls-templates.php:64
972
  msgid "Voting Form Footer Template"
973
  msgstr ""
974
 
975
- #: polls-templates.php:65
976
  msgid "Result Header Template"
977
  msgstr ""
978
 
979
- #: polls-templates.php:66
980
  msgid "Result Body Template"
981
  msgstr ""
982
 
983
- #: polls-templates.php:67
984
  msgid "Result Body2 Template"
985
  msgstr ""
986
 
987
- #: polls-templates.php:68
988
  msgid "Result Footer Template"
989
  msgstr ""
990
 
991
- #: polls-templates.php:69
992
  msgid "Result Footer2 Template"
993
  msgstr ""
994
 
995
- #: polls-templates.php:70
996
  msgid "Poll Archive Link Template"
997
  msgstr ""
998
 
999
- #: polls-templates.php:71
1000
  msgid "Poll Archive Poll Header Template"
1001
  msgstr ""
1002
 
1003
- #: polls-templates.php:72
1004
  msgid "Poll Archive Poll Footer Template"
1005
  msgstr ""
1006
 
1007
- #: polls-templates.php:73
 
 
 
 
 
 
 
 
1008
  msgid "Poll Disabled Template"
1009
  msgstr ""
1010
 
1011
- #: polls-templates.php:74
1012
  msgid "Poll Error Template"
1013
  msgstr ""
1014
 
1015
- #: polls-templates.php:104
1016
- #: polls-templates.php:119
1017
- #: polls.php:1307
1018
- #: polls.php:1320
1019
  msgid "Vote"
1020
  msgstr ""
1021
 
1022
- #: polls-templates.php:104
1023
- #: polls.php:1308
1024
  msgid "View Results Of This Poll"
1025
  msgstr ""
1026
 
1027
- #: polls-templates.php:104
1028
- #: polls.php:1308
1029
  msgid "View Results"
1030
  msgstr ""
1031
 
1032
- #: polls-templates.php:113
1033
- #: polls.php:1314
1034
  msgid "You Have Voted For This Choice"
1035
  msgstr ""
1036
 
1037
- #: polls-templates.php:119
1038
- #: polls.php:1320
1039
  msgid "Vote For This Poll"
1040
  msgstr ""
1041
 
1042
- #: polls-templates.php:122
1043
- #: polls-usage.php:80
1044
- #: polls.php:1347
1045
  msgid "Polls Archive"
1046
  msgstr ""
1047
 
1048
- #: polls-templates.php:128
1049
  msgid "Start Date:"
1050
  msgstr ""
1051
 
1052
- #: polls-templates.php:128
1053
  msgid "End Date:"
1054
  msgstr ""
1055
 
1056
- #: polls-templates.php:131
1057
- #: polls.php:1322
1058
  msgid "Sorry, there are no polls available at the moment."
1059
  msgstr ""
1060
 
1061
- #: polls-templates.php:134
1062
- #: polls.php:1323
1063
  msgid "An error has occurred when processing your poll."
1064
  msgstr ""
1065
 
1066
- #: polls-templates.php:144
1067
- #: polls.php:60
1068
  msgid "Poll Templates"
1069
  msgstr ""
1070
 
1071
- #: polls-templates.php:146
1072
  msgid "Template Variables"
1073
  msgstr ""
1074
 
1075
- #: polls-templates.php:151
1076
  msgid "Display the poll's ID"
1077
  msgstr ""
1078
 
1079
- #: polls-templates.php:155
1080
  msgid "Display the poll's answer ID"
1081
  msgstr ""
1082
 
1083
- #: polls-templates.php:161
1084
  msgid "Display the poll's question"
1085
  msgstr ""
1086
 
1087
- #: polls-templates.php:165
1088
  msgid "Display the poll's answer"
1089
  msgstr ""
1090
 
1091
- #: polls-templates.php:171
1092
  msgid "Display the poll's total votes NOT the number of people who voted for the poll"
1093
  msgstr ""
1094
 
1095
- #: polls-templates.php:175
1096
  msgid "Display the poll's answer without HTML formatting."
1097
  msgstr ""
1098
 
1099
- #: polls-templates.php:181
1100
  msgid "Displays URL to poll's result"
1101
  msgstr ""
1102
 
1103
- #: polls-templates.php:185
1104
  msgid "Display the poll's answer votes"
1105
  msgstr ""
1106
 
1107
- #: polls-templates.php:191
1108
  msgid "Display the poll's most voted answer"
1109
  msgstr ""
1110
 
1111
- #: polls-templates.php:195
1112
  msgid "Display the poll's answer percentage"
1113
  msgstr ""
1114
 
1115
- #: polls-templates.php:201
1116
  msgid "Display the poll's answer votes for the most voted answer"
1117
  msgstr ""
1118
 
1119
- #: polls-templates.php:205
1120
  msgid "Display the poll's answer image width"
1121
  msgstr ""
1122
 
1123
- #: polls-templates.php:211
1124
  msgid "Display the poll's answer percentage for the most voted answer"
1125
  msgstr ""
1126
 
1127
- #: polls-templates.php:215
1128
  msgid "Display the poll's least voted answer"
1129
  msgstr ""
1130
 
1131
- #: polls-templates.php:221
1132
  msgid "Display the poll's start date/time"
1133
  msgstr ""
1134
 
1135
- #: polls-templates.php:225
1136
  msgid "Display the poll's answer votes for the least voted answer"
1137
  msgstr ""
1138
 
1139
- #: polls-templates.php:231
1140
  msgid "Display the poll's end date/time"
1141
  msgstr ""
1142
 
1143
- #: polls-templates.php:235
1144
  msgid "Display the poll's answer percentage for the least voted answer"
1145
  msgstr ""
1146
 
1147
- #: polls-templates.php:241
1148
  msgid "Display the the maximum number of answers the user can choose if the poll supports multiple answers"
1149
  msgstr ""
1150
 
1151
- #: polls-templates.php:245
1152
  msgid "Display \"checkbox\" or \"radio\" input types depending on the poll type"
1153
  msgstr ""
1154
 
1155
- #: polls-templates.php:251
1156
  msgid "Display the number of people who voted for the poll NOT the total votes of the poll"
1157
  msgstr ""
1158
 
1159
- #: polls-templates.php:255
1160
  msgid "Display the poll archive URL"
1161
  msgstr ""
1162
 
1163
- #: polls-templates.php:260
1164
- msgid "Note:"
1165
- msgstr ""
1166
-
1167
- #: polls-templates.php:261
1168
- msgid "<strong>%POLL_TOTALVOTES%</strong> and <strong>%POLL_TOTALVOTERS%</strong> will be different if your poll supports multiple answers. If your poll allows only single answer, both value will be the same."
1169
  msgstr ""
1170
 
1171
- #: polls-templates.php:267
1172
  msgid "Poll Voting Form Templates"
1173
  msgstr ""
1174
 
1175
- #: polls-templates.php:271
1176
  msgid "Voting Form Header:"
1177
  msgstr ""
1178
 
1179
- #: polls-templates.php:272
1180
- #: polls-templates.php:287
1181
- #: polls-templates.php:300
1182
- #: polls-templates.php:316
1183
- #: polls-templates.php:331
1184
- #: polls-templates.php:345
1185
- #: polls-templates.php:359
1186
- #: polls-templates.php:379
1187
- #: polls-templates.php:404
1188
- #: polls-templates.php:413
1189
- #: polls-templates.php:422
1190
- #: polls-templates.php:446
1191
- #: polls-templates.php:455
 
 
1192
  msgid "Allowed Variables:"
1193
  msgstr ""
1194
 
1195
- #: polls-templates.php:280
1196
- #: polls-templates.php:293
1197
  #: polls-templates.php:304
1198
- #: polls-templates.php:324
1199
- #: polls-templates.php:338
1200
- #: polls-templates.php:352
1201
- #: polls-templates.php:372
1202
- #: polls-templates.php:392
1203
- #: polls-templates.php:406
1204
- #: polls-templates.php:415
1205
- #: polls-templates.php:434
1206
- #: polls-templates.php:448
1207
- #: polls-templates.php:457
 
 
 
1208
  msgid "Restore Default Template"
1209
  msgstr ""
1210
 
1211
- #: polls-templates.php:286
1212
  msgid "Voting Form Body:"
1213
  msgstr ""
1214
 
1215
- #: polls-templates.php:299
1216
  msgid "Voting Form Footer:"
1217
  msgstr ""
1218
 
1219
- #: polls-templates.php:311
1220
  msgid "Poll Result Templates"
1221
  msgstr ""
1222
 
1223
- #: polls-templates.php:315
1224
  msgid "Result Header:"
1225
  msgstr ""
1226
 
1227
- #: polls-templates.php:330
1228
- #: polls-templates.php:344
1229
  msgid "Result Body:"
1230
  msgstr ""
1231
 
1232
- #: polls-templates.php:330
1233
- #: polls-templates.php:378
1234
  msgid "Displayed When The User HAS NOT Voted"
1235
  msgstr ""
1236
 
1237
- #: polls-templates.php:344
1238
- #: polls-templates.php:358
1239
  msgid "Displayed When The User HAS Voted"
1240
  msgstr ""
1241
 
1242
- #: polls-templates.php:358
1243
- #: polls-templates.php:378
1244
  msgid "Result Footer:"
1245
  msgstr ""
1246
 
1247
- #: polls-templates.php:399
1248
  msgid "Poll Archive Templates"
1249
  msgstr ""
1250
 
1251
- #: polls-templates.php:403
1252
  msgid "Poll Archive Link"
1253
  msgstr ""
1254
 
1255
- #: polls-templates.php:403
1256
  msgid "Template For Displaying Poll Archive Link"
1257
  msgstr ""
1258
 
1259
- #: polls-templates.php:412
1260
  msgid "Individual Poll Header"
1261
  msgstr ""
1262
 
1263
- #: polls-templates.php:412
1264
  msgid "Displayed Before Each Poll In The Poll Archive"
1265
  msgstr ""
1266
 
1267
- #: polls-templates.php:414
1268
- #: polls-templates.php:447
1269
- #: polls-templates.php:456
 
 
1270
  msgid "N/A"
1271
  msgstr ""
1272
 
1273
- #: polls-templates.php:421
1274
  msgid "Individual Poll Footer"
1275
  msgstr ""
1276
 
1277
- #: polls-templates.php:421
1278
  msgid "Displayed After Each Poll In The Poll Archive"
1279
  msgstr ""
1280
 
1281
- #: polls-templates.php:441
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1282
  msgid "Poll Misc Templates"
1283
  msgstr ""
1284
 
1285
- #: polls-templates.php:445
1286
  msgid "Poll Disabled"
1287
  msgstr ""
1288
 
1289
- #: polls-templates.php:445
1290
  msgid "Displayed When The Poll Is Disabled"
1291
  msgstr ""
1292
 
1293
- #: polls-templates.php:454
1294
  msgid "Poll Error"
1295
  msgstr ""
1296
 
1297
- #: polls-templates.php:454
1298
  msgid "Displayed When An Error Has Occured While Processing The Poll"
1299
  msgstr ""
1300
 
1301
- #: polls-templates.php:464
1302
- msgid "Update Templates"
1303
- msgstr ""
1304
-
1305
  #: polls-uninstall.php:39
1306
- #: polls-uninstall.php:131
1307
  msgid "UNINSTALL WP-Polls"
1308
  msgstr ""
1309
 
@@ -1324,7 +1324,7 @@ msgstr ""
1324
 
1325
  #: polls-uninstall.php:81
1326
  #: polls-uninstall.php:91
1327
- #: polls.php:62
1328
  msgid "Uninstall WP-Polls"
1329
  msgstr ""
1330
 
@@ -1349,15 +1349,19 @@ msgstr ""
1349
  msgid "The following WordPress Options/Tables will be DELETED:"
1350
  msgstr ""
1351
 
1352
- #: polls-uninstall.php:104
1353
  msgid "WordPress Options"
1354
  msgstr ""
1355
 
1356
- #: polls-uninstall.php:105
1357
  msgid "WordPress Tables"
1358
  msgstr ""
1359
 
1360
  #: polls-uninstall.php:131
 
 
 
 
1361
  msgid ""
1362
  "You Are About To Uninstall WP-Polls From WordPress.\\n"
1363
  "This Action Is Not Reversible.\\n"
@@ -1365,262 +1369,148 @@ msgid ""
1365
  " Choose [Cancel] To Stop, [OK] To Uninstall."
1366
  msgstr ""
1367
 
1368
- #: polls-usage.php:26
1369
- msgid "General Usage (Without Widget)"
1370
- msgstr ""
1371
-
1372
- #: polls-usage.php:29
1373
- msgid "Open "
1374
- msgstr ""
1375
-
1376
- #: polls-usage.php:29
1377
- msgid "YOUR THEME NAME"
1378
- msgstr ""
1379
-
1380
- #: polls-usage.php:32
1381
- msgid "Add:"
1382
- msgstr ""
1383
-
1384
- #: polls-usage.php:44
1385
- msgid "To show specific poll, use :"
1386
- msgstr ""
1387
-
1388
- #: polls-usage.php:46
1389
- #: polls-usage.php:49
1390
- msgid "where <strong>2</strong> is your poll id."
1391
- msgstr ""
1392
-
1393
- #: polls-usage.php:47
1394
- msgid "To embed a specific poll in your post, use :"
1395
- msgstr ""
1396
-
1397
- #: polls-usage.php:52
1398
- msgid "Scroll down for instructions on how to create <strong>Polls Archive</strong>."
1399
- msgstr ""
1400
-
1401
- #: polls-usage.php:57
1402
- msgid "General Usage (With Widget)"
1403
- msgstr ""
1404
-
1405
- #: polls-usage.php:60
1406
- msgid "<strong>Activate</strong> WP-Polls Widget Plugin"
1407
- msgstr ""
1408
-
1409
- #: polls-usage.php:63
1410
- msgid "Go to 'WP-Admin -> Presentation -> Sidebar Widgets'"
1411
- msgstr ""
1412
-
1413
- #: polls-usage.php:66
1414
- msgid "<strong>Drag</strong> the Polls Widget to your sidebar"
1415
- msgstr ""
1416
-
1417
- #: polls-usage.php:69
1418
- msgid "You can <strong>configure</strong> the Polls Widget by clicking on the configure icon"
1419
- msgstr ""
1420
-
1421
- #: polls-usage.php:72
1422
- msgid "Click 'Save changes'"
1423
- msgstr ""
1424
-
1425
- #: polls-usage.php:75
1426
- msgid " down for instructions on how to create a <strong>Polls Archive</strong>."
1427
- msgstr ""
1428
-
1429
- #: polls-usage.php:83
1430
- msgid "Go to 'WP-Admin -> Write -> Write Page'"
1431
- msgstr ""
1432
-
1433
- #: polls-usage.php:86
1434
- msgid "Type any title you like in the post's title area"
1435
- msgstr ""
1436
-
1437
- #: polls-usage.php:89
1438
- #, php-format
1439
- msgid "Type '<strong>%s</strong>' in the post's content area (without the quotes)"
1440
- msgstr ""
1441
-
1442
- #: polls-usage.php:92
1443
- msgid "Type '<strong>pollsarchive</strong>' in the post's slug area (without the quotes)"
1444
- msgstr ""
1445
-
1446
- #: polls-usage.php:95
1447
- msgid "Click 'Publish'"
1448
- msgstr ""
1449
-
1450
- #: polls-usage.php:98
1451
- msgid "If you <strong>ARE NOT</strong> using nice permalinks, you need to go to 'WP-Admin -> Polls -> Poll Option' and under '<strong>Poll Archive -> Polls Archive URL</strong>', you need to fill in the URL to the Polls Archive Page you created above."
1452
- msgstr ""
1453
-
1454
- #: polls-usage.php:104
1455
- msgid "To Display Total Polls"
1456
- msgstr ""
1457
-
1458
- #: polls-usage.php:110
1459
- msgid "To Display Total Poll Answers"
1460
- msgstr ""
1461
-
1462
- #: polls-usage.php:116
1463
- msgid "To Display Total Poll Votes"
1464
- msgstr ""
1465
-
1466
- #: polls-usage.php:122
1467
- msgid "To Display Total Poll Voters"
1468
  msgstr ""
1469
 
1470
- #: polls-usage.php:130
1471
- msgid "Note"
1472
  msgstr ""
1473
 
1474
- #: polls-usage.php:133
1475
- msgid "In IE, some of the poll's text may appear jagged (this is normal in IE). To solve this issue,"
1476
  msgstr ""
1477
 
1478
- #: polls-usage.php:136
1479
- msgid "Open <strong>poll-css.css</strong>"
1480
  msgstr ""
1481
 
1482
- #: polls-usage.php:139
1483
- msgid "Find:"
1484
  msgstr ""
1485
 
1486
- #: polls-usage.php:143
1487
- msgid "Replace:"
1488
  msgstr ""
1489
 
1490
- #: polls-usage.php:145
1491
- msgid "Where <strong>#ffffff</strong> should be your background color for the poll."
1492
  msgstr ""
1493
 
1494
- #: polls-widget.php:64
1495
- #: polls.php:54
1496
- msgid "Polls"
1497
  msgstr ""
1498
 
1499
- #: polls-widget.php:96
1500
- msgid "Title"
1501
  msgstr ""
1502
 
1503
- #: polls-widget.php:99
1504
- msgid "Display Polls Archive Link Below Poll?"
1505
  msgstr ""
1506
 
1507
- #: polls-widget.php:159
1508
- msgid "Select Multiple Polls"
1509
  msgstr ""
1510
 
1511
- #: polls.php:61
1512
- msgid "Poll Usage"
1513
  msgstr ""
1514
 
1515
- #: polls.php:201
1516
- #: polls.php:207
1517
  msgid "Poll"
1518
  msgstr ""
1519
 
1520
- #: polls.php:208
1521
  msgid "Insert Poll"
1522
  msgstr ""
1523
 
1524
- #: polls.php:431
1525
- #: polls.php:591
1526
  msgid "Loading"
1527
  msgstr ""
1528
 
1529
- #: polls.php:634
1530
  msgid "Note: There is a poll embedded within this post, please visit the site to participate in this post's poll."
1531
  msgstr ""
1532
 
1533
- #: polls.php:977
1534
- msgid "Previous Page"
1535
- msgstr ""
1536
-
1537
- #: polls.php:985
1538
- msgid "Next Page"
1539
- msgstr ""
1540
-
1541
- #: polls.php:994
1542
- msgid "Pages"
1543
- msgstr ""
1544
-
1545
- #: polls.php:996
1546
- msgid "Go to First Page"
1547
- msgstr ""
1548
-
1549
- #: polls.php:996
1550
- msgid "First"
1551
  msgstr ""
1552
 
1553
- #: polls.php:999
1554
- #: polls.php:1011
1555
- msgid "Go to Page"
1556
  msgstr ""
1557
 
1558
- #: polls.php:1006
1559
- msgid "Page"
1560
  msgstr ""
1561
 
1562
- #: polls.php:1014
1563
- msgid "Go to Last Page"
1564
  msgstr ""
1565
 
1566
- #: polls.php:1014
1567
- msgid "Last"
1568
  msgstr ""
1569
 
1570
- #: polls.php:1187
1571
  #, php-format
1572
  msgid "Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s"
1573
  msgstr ""
1574
 
1575
- #: polls.php:1191
1576
  #, php-format
1577
  msgid "You Had Already Voted For This Poll. Poll ID #%s"
1578
  msgstr ""
1579
 
1580
- #: polls.php:1195
1581
  #, php-format
1582
  msgid "Invalid Poll ID. Poll ID #%s"
1583
  msgstr ""
1584
 
1585
- #: polls.php:1221
1586
- #: polls.php:1223
1587
- #: polls.php:1233
1588
  msgid "WP-Polls"
1589
  msgstr ""
1590
 
1591
- #: polls.php:1235
1592
  msgid "polls were created."
1593
  msgstr ""
1594
 
1595
- #: polls.php:1236
1596
  msgid "polls' answers were given."
1597
  msgstr ""
1598
 
1599
- #: polls.php:1237
1600
  msgid "votes were casted."
1601
  msgstr ""
1602
 
1603
- #: polls.php:1291
1604
  msgid "How Is My Site?"
1605
  msgstr ""
1606
 
1607
- #: polls.php:1294
1608
  msgid "Good"
1609
  msgstr ""
1610
 
1611
- #: polls.php:1295
1612
  msgid "Excellent"
1613
  msgstr ""
1614
 
1615
- #: polls.php:1296
1616
  msgid "Bad"
1617
  msgstr ""
1618
 
1619
- #: polls.php:1297
1620
  msgid "Can Be Improved"
1621
  msgstr ""
1622
 
1623
- #: polls.php:1298
1624
  msgid "No Comments"
1625
  msgstr ""
1626
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WP-Polls 2.30\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2008-05-13 12:14+0800\n"
6
+ "PO-Revision-Date: 2008-05-13 12:14+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"
17
 
18
  #: polls-add.php:36
19
  #: polls-add.php:174
20
+ #: polls-add.php:241
21
+ #: wp-polls.php:59
22
  msgid "Add Poll"
23
  msgstr ""
24
 
38
  msgid "Poll '%s' Added Successfully."
39
  msgstr ""
40
 
41
+ #: polls-add.php:96
42
+ #: polls-manager.php:458
43
+ #: wp-polls.php:58
44
+ msgid "Manage Polls"
45
+ msgstr ""
46
+
47
  #: polls-add.php:124
48
+ #: polls-logs.php:280
49
+ #: polls-logs.php:323
50
  #: polls-manager.php:237
51
  msgid "Answer"
52
  msgstr ""
56
  msgstr ""
57
 
58
  #: polls-add.php:176
59
+ #: polls-manager.php:309
60
  msgid "Poll Question"
61
  msgstr ""
62
 
63
  #: polls-add.php:179
64
+ #: polls-manager.php:312
65
+ #: polls-manager.php:464
66
+ msgid "Question"
67
  msgstr ""
68
 
69
  #: polls-add.php:184
70
+ #: polls-manager.php:317
71
  msgid "Poll Answers"
72
  msgstr ""
73
 
74
  #: polls-add.php:189
75
+ #: polls-manager.php:352
76
  msgid "Add Answer"
77
  msgstr ""
78
 
79
  #: polls-add.php:189
80
+ #: polls-manager.php:352
81
  msgid "Remove Answer"
82
  msgstr ""
83
 
84
+ #: polls-add.php:196
85
+ #: polls-manager.php:339
86
  #, php-format
87
+ msgid "Answer %s"
88
  msgstr ""
89
 
90
+ #: polls-add.php:205
91
+ #: polls-manager.php:363
92
  msgid "Poll Multiple Answers"
93
  msgstr ""
94
 
95
+ #: polls-add.php:208
96
+ #: polls-manager.php:366
97
  msgid "Allows Users To Select More Than One Answer?"
98
  msgstr ""
99
 
100
+ #: polls-add.php:211
101
+ #: polls-manager.php:369
102
+ #: polls-options.php:204
103
+ #: polls-options.php:213
104
+ #: polls-options.php:330
105
+ #: wp-polls-widget.php:105
106
  msgid "No"
107
  msgstr ""
108
 
109
+ #: polls-add.php:212
110
+ #: polls-logs.php:372
111
+ #: polls-manager.php:370
112
+ #: polls-manager.php:593
113
+ #: polls-options.php:205
114
+ #: polls-options.php:214
115
+ #: polls-options.php:331
116
+ #: polls-uninstall.php:132
117
+ #: wp-polls-widget.php:110
118
  msgid "Yes"
119
  msgstr ""
120
 
121
+ #: polls-add.php:217
122
+ #: polls-manager.php:375
123
  msgid "Maximum Number Of Selected Answers Allowed?"
124
  msgstr ""
125
 
126
+ #: polls-add.php:230
127
+ #: polls-manager.php:392
128
  msgid "Poll Start/End Date"
129
  msgstr ""
130
 
131
+ #: polls-add.php:233
132
+ #: polls-manager.php:395
133
+ #: polls-manager.php:466
134
+ msgid "Start Date/Time"
135
  msgstr ""
136
 
137
+ #: polls-add.php:237
138
+ #: polls-manager.php:403
139
+ #: polls-manager.php:467
140
+ msgid "End Date/Time"
141
  msgstr ""
142
 
143
+ #: polls-add.php:238
144
+ #: polls-manager.php:414
145
  msgid "Do NOT Expire This Poll"
146
  msgstr ""
147
 
148
+ #: polls-add.php:241
149
+ #: polls-manager.php:440
 
 
150
  msgid "Cancel"
151
  msgstr ""
152
 
153
  #: polls-admin-ajax.php:38
154
+ #: polls-manager.php:594
155
+ #: wp-polls.php:218
156
  msgid "Delete All Logs"
157
  msgstr ""
158
 
165
  msgstr ""
166
 
167
  #: polls-admin-ajax.php:49
168
+ #: polls-logs.php:373
169
+ #: wp-polls.php:220
170
  msgid "Delete Logs For This Poll Only"
171
  msgstr ""
172
 
181
  msgstr ""
182
 
183
  #: polls-admin-ajax.php:62
184
+ #: wp-polls.php:222
185
  msgid "Delete Poll Answer"
186
  msgstr ""
187
 
196
  msgstr ""
197
 
198
  #: polls-admin-ajax.php:78
199
+ #: polls-manager.php:439
200
+ #: wp-polls.php:223
201
  msgid "Open Poll"
202
  msgstr ""
203
 
212
  msgstr ""
213
 
214
  #: polls-admin-ajax.php:89
215
+ #: polls-manager.php:438
216
+ #: wp-polls.php:224
217
  msgid "Close Poll"
218
  msgstr ""
219
 
228
  msgstr ""
229
 
230
  #: polls-admin-ajax.php:100
231
+ #: wp-polls.php:216
232
  msgid "Delete Poll"
233
  msgstr ""
234
 
242
  msgid "Poll '%s' Deleted Successfully"
243
  msgstr ""
244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  #: polls-logs.php:33
246
  #: polls-logs.php:34
247
  #: polls-logs.php:37
280
  msgid "Filter Poll's Logs"
281
  msgstr ""
282
 
283
+ #: polls-logs.php:142
284
+ msgid "Display All Users That Voted For"
285
  msgstr ""
286
 
287
+ #: polls-logs.php:163
288
+ #: polls-logs.php:210
289
  msgid "Voters To EXCLUDE"
290
  msgstr ""
291
 
292
+ #: polls-logs.php:165
293
+ #: polls-logs.php:212
294
  msgid "Registered Users"
295
  msgstr ""
296
 
297
+ #: polls-logs.php:166
298
+ #: polls-logs.php:213
299
  msgid "Comment Authors"
300
  msgstr ""
301
 
302
+ #: polls-logs.php:167
303
  msgid "Guests"
304
  msgstr ""
305
 
306
+ #: polls-logs.php:171
307
+ #: polls-logs.php:218
308
+ #: polls-logs.php:252
309
  msgid "Filter"
310
  msgstr ""
311
 
312
+ #: polls-logs.php:182
313
+ msgid "Display Users That Voted For"
314
  msgstr ""
315
 
316
+ #: polls-logs.php:185
317
  msgid "More Than"
318
  msgstr ""
319
 
320
+ #: polls-logs.php:186
321
  msgid "More Than Or Exactly"
322
  msgstr ""
323
 
324
+ #: polls-logs.php:187
325
  msgid "Exactly"
326
  msgstr ""
327
 
328
+ #: polls-logs.php:188
329
  msgid "Less Than Or Exactly"
330
  msgstr ""
331
 
332
+ #: polls-logs.php:189
333
  msgid "Less Than"
334
  msgstr ""
335
 
336
+ #: polls-logs.php:196
337
  msgid "1 Answer"
338
  msgstr ""
339
 
340
+ #: polls-logs.php:199
341
+ #: polls-logs.php:201
342
  #, php-format
343
  msgid "%s Answers"
344
  msgstr ""
345
 
346
+ #: polls-logs.php:214
347
  msgid "Guests will automatically be excluded"
348
  msgstr ""
349
 
350
+ #: polls-logs.php:234
351
+ msgid "Display What This User Has Voted"
352
  msgstr ""
353
 
354
+ #: polls-logs.php:260
355
  msgid "Clear Filter"
356
  msgstr ""
357
 
358
+ #: polls-logs.php:267
359
  msgid "Poll Logs"
360
  msgstr ""
361
 
362
+ #: polls-logs.php:272
363
  msgid "This default filter is limited to display only <strong>100</strong> records."
364
  msgstr ""
365
 
366
+ #: polls-logs.php:281
367
  msgid "IP"
368
  msgstr ""
369
 
370
+ #: polls-logs.php:282
371
  msgid "Host"
372
  msgstr ""
373
 
374
+ #: polls-logs.php:283
375
+ #: polls-logs.php:330
376
  msgid "Date"
377
  msgstr ""
378
 
379
+ #: polls-logs.php:290
380
+ #: polls-logs.php:318
381
+ #: polls-manager.php:397
382
+ #: polls-manager.php:409
383
+ #: polls-manager.php:487
384
+ #: polls-manager.php:495
385
+ #: wp-polls.php:404
386
+ #: wp-polls.php:409
387
+ #: wp-polls.php:520
388
+ #: wp-polls.php:525
389
+ #: wp-polls.php:910
390
+ #: wp-polls.php:914
391
  #, php-format
392
  msgid "%s @ %s"
393
  msgstr ""
394
 
395
+ #: polls-logs.php:298
396
+ #: polls-logs.php:328
397
  msgid "User"
398
  msgstr ""
399
 
400
+ #: polls-logs.php:327
401
  msgid "No."
402
  msgstr ""
403
 
404
+ #: polls-logs.php:329
405
  msgid "IP/Host"
406
  msgstr ""
407
 
408
+ #: polls-logs.php:351
409
  #, php-format
410
  msgid "Total number of records that matches this filter: <strong>%s</strong>"
411
  msgstr ""
412
 
413
+ #: polls-logs.php:358
414
  msgid "No poll logs matches the filter."
415
  msgstr ""
416
 
417
+ #: polls-logs.php:360
418
+ #: polls-logs.php:376
419
+ msgid "No poll logs available for this poll."
420
+ msgstr ""
421
+
422
+ #: polls-logs.php:367
423
  msgid "Delete Poll Logs"
424
  msgstr ""
425
 
426
+ #: polls-logs.php:371
427
  msgid "Are You Sure You Want To Delete Logs For This Poll Only?"
428
  msgstr ""
429
 
430
+ #: polls-logs.php:373
431
  #, php-format
432
  msgid "You are about to delete poll logs for this poll '%s' ONLY. This action is not reversible."
433
  msgstr ""
434
 
435
+ #: polls-logs.php:380
436
  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."
437
  msgstr ""
438
 
439
  #: polls-manager.php:39
440
+ #: polls-manager.php:307
441
+ #: polls-manager.php:428
442
  msgid "Edit Poll"
443
  msgstr ""
444
 
472
  msgid "Poll '%s' Edited Successfully."
473
  msgstr ""
474
 
475
+ #: polls-manager.php:279
476
  msgid "No more poll's answer to be removed."
477
  msgstr ""
478
 
479
+ #: polls-manager.php:321
480
+ msgid "Answer No."
 
 
 
 
 
481
  msgstr ""
482
 
483
+ #: polls-manager.php:322
484
+ msgid "Answer Text"
485
  msgstr ""
486
 
487
+ #: polls-manager.php:323
488
  msgid "No. Of Votes"
489
  msgstr ""
490
 
491
+ #: polls-manager.php:332
492
  msgid "Null Votes"
493
  msgstr ""
494
 
495
+ #: polls-manager.php:341
496
+ #: polls-manager.php:542
497
  msgid "Delete"
498
  msgstr ""
499
 
500
+ #: polls-manager.php:341
501
  #, php-format
502
  msgid "You are about to delete this poll's answer '%s'."
503
  msgstr ""
504
 
505
+ #: polls-manager.php:353
506
  msgid "Total Votes:"
507
  msgstr ""
508
 
509
+ #: polls-manager.php:358
 
510
  msgid "Total Voters:"
511
  msgstr ""
512
 
513
  #: polls-manager.php:398
 
 
 
 
 
514
  msgid "Edit Start Date/Time"
515
  msgstr ""
516
 
517
+ #: polls-manager.php:407
 
 
 
 
 
518
  msgid "This Poll Will Not Expire"
519
  msgstr ""
520
 
521
+ #: polls-manager.php:438
522
  #, php-format
523
  msgid "You are about to CLOSE this poll '%s'."
524
  msgstr ""
525
 
526
+ #: polls-manager.php:439
527
  #, php-format
528
  msgid "You are about to OPEN this poll '%s'."
529
  msgstr ""
530
 
531
+ #: polls-manager.php:463
 
 
 
 
 
532
  msgid "ID"
533
  msgstr ""
534
 
535
+ #: polls-manager.php:465
536
+ #: polls-manager.php:576
537
+ #: polls-templates.php:122
538
+ #: polls-templates.php:125
539
+ #: wp-polls.php:1370
540
+ #: wp-polls.php:1373
541
  msgid "Total Voters"
542
  msgstr ""
543
 
544
+ #: polls-manager.php:468
545
  msgid "Status"
546
  msgstr ""
547
 
548
+ #: polls-manager.php:469
549
  msgid "Action"
550
  msgstr ""
551
 
552
+ #: polls-manager.php:493
553
+ #: wp-polls.php:407
554
+ #: wp-polls.php:523
555
+ #: wp-polls.php:912
556
  msgid "No Expiry"
557
  msgstr ""
558
 
559
+ #: polls-manager.php:518
560
+ #: polls-manager.php:522
561
+ #: polls-manager.php:525
562
  msgid "Displayed:"
563
  msgstr ""
564
 
565
+ #: polls-manager.php:533
566
  msgid "Open"
567
  msgstr ""
568
 
569
+ #: polls-manager.php:535
570
  msgid "Future"
571
  msgstr ""
572
 
573
+ #: polls-manager.php:537
574
  msgid "Closed"
575
  msgstr ""
576
 
577
+ #: polls-manager.php:540
578
  msgid "Logs"
579
  msgstr ""
580
 
581
+ #: polls-manager.php:541
582
  msgid "Edit"
583
  msgstr ""
584
 
585
+ #: polls-manager.php:542
586
  #, php-format
587
  msgid "You are about to delete this poll, '%s'."
588
  msgstr ""
589
 
590
+ #: polls-manager.php:550
591
  msgid "No Polls Found"
592
  msgstr ""
593
 
594
  #: polls-manager.php:560
 
595
  msgid "Polls Stats"
596
  msgstr ""
597
 
598
+ #: polls-manager.php:564
599
+ msgid "Total Polls"
600
  msgstr ""
601
 
602
+ #: polls-manager.php:568
603
+ msgid "Total Polls' Answers"
604
  msgstr ""
605
 
606
+ #: polls-manager.php:572
607
+ msgid "Total Votes Casted"
608
  msgstr ""
609
 
610
+ #: polls-manager.php:585
611
  msgid "Polls Logs"
612
  msgstr ""
613
 
614
+ #: polls-manager.php:592
615
  msgid "Are You Sure You Want To Delete All Polls Logs?"
616
  msgstr ""
617
 
618
+ #: polls-manager.php:594
619
  msgid "You are about to delete all poll logs. This action is not reversible."
620
  msgstr ""
621
 
622
  #: polls-manager.php:597
623
+ #: wp-polls.php:217
624
+ msgid "No poll logs available."
625
+ msgstr ""
626
+
627
+ #: polls-manager.php:601
628
  msgid "Note:<br />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."
629
  msgstr ""
630
 
631
+ #: polls-options.php:70
 
632
  #: polls-options.php:136
633
+ #: polls-options.php:139
634
  msgid "Poll Bar Style"
635
  msgstr ""
636
 
637
+ #: polls-options.php:71
638
  msgid "Poll AJAX Style"
639
  msgstr ""
640
 
641
+ #: polls-options.php:72
642
  msgid "Sort Poll Answers By Option"
643
  msgstr ""
644
 
645
+ #: polls-options.php:73
646
  msgid "Sort Order Of Poll Answers Option"
647
  msgstr ""
648
 
649
+ #: polls-options.php:74
650
  msgid "Sort Poll Results By Option"
651
  msgstr ""
652
 
653
+ #: polls-options.php:75
654
  msgid "Sort Order Of Poll Results Option"
655
  msgstr ""
656
 
657
+ #: polls-options.php:76
658
  msgid "Number Of Polls Per Page To Display In Poll Archive Option"
659
  msgstr ""
660
 
661
+ #: polls-options.php:77
662
  msgid "Type Of Polls To Display In Poll Archive Option"
663
  msgstr ""
664
 
665
+ #: polls-options.php:78
666
  msgid "Poll Archive URL Option"
667
  msgstr ""
668
 
669
+ #: polls-options.php:79
670
  msgid "Show Poll Achive Link Option"
671
  msgstr ""
672
 
673
+ #: polls-options.php:80
674
  msgid "Current Active Poll Option"
675
  msgstr ""
676
 
677
+ #: polls-options.php:81
678
  msgid "Poll Close Option"
679
  msgstr ""
680
 
681
+ #: polls-options.php:82
682
+ #: polls-options.php:285
683
  msgid "Logging Method"
684
  msgstr ""
685
 
686
+ #: polls-options.php:83
687
+ msgid "Cookie And Log Expiry Option"
688
+ msgstr ""
689
+
690
+ #: polls-options.php:84
691
  msgid "Allow To Vote Option"
692
  msgstr ""
693
 
694
+ #: polls-options.php:89
695
+ #: polls-templates.php:85
696
  msgid "Updated"
697
  msgstr ""
698
 
699
+ #: polls-options.php:94
700
+ #: polls-templates.php:90
701
  msgid "No Poll Option Updated"
702
  msgstr ""
703
 
704
+ #: polls-options.php:134
705
+ #: wp-polls.php:60
706
  msgid "Poll Options"
707
  msgstr ""
708
 
709
+ #: polls-options.php:165
710
  msgid "Use CSS Style"
711
  msgstr ""
712
 
713
+ #: polls-options.php:169
714
  msgid "Poll Bar Background"
715
  msgstr ""
716
 
717
+ #: polls-options.php:174
718
  msgid "Poll Bar Border"
719
  msgstr ""
720
 
721
+ #: polls-options.php:179
722
  msgid "Poll Bar Height"
723
  msgstr ""
724
 
725
+ #: polls-options.php:183
726
  msgid "Your poll bar will look like this"
727
  msgstr ""
728
 
729
+ #: polls-options.php:198
730
  msgid "Polls AJAX Style"
731
  msgstr ""
732
 
733
+ #: polls-options.php:201
734
  msgid "Show Loading Image With Text"
735
  msgstr ""
736
 
737
+ #: polls-options.php:210
738
  msgid "Show Fading In And Fading Out Of Poll"
739
  msgstr ""
740
 
741
+ #: polls-options.php:221
742
  msgid "Sorting Of Poll Answers"
743
  msgstr ""
744
 
745
+ #: polls-options.php:224
746
  msgid "Sort Poll Answers By:"
747
  msgstr ""
748
 
749
+ #: polls-options.php:227
750
+ #: polls-options.php:252
751
  msgid "Exact Order"
752
  msgstr ""
753
 
754
+ #: polls-options.php:228
755
+ #: polls-options.php:253
756
  msgid "Alphabetical Order"
757
  msgstr ""
758
 
759
+ #: polls-options.php:229
760
+ #: polls-options.php:254
761
  msgid "Random Order"
762
  msgstr ""
763
 
764
+ #: polls-options.php:234
765
  msgid "Sort Order Of Poll Answers:"
766
  msgstr ""
767
 
768
+ #: polls-options.php:237
769
+ #: polls-options.php:262
770
  msgid "Ascending"
771
  msgstr ""
772
 
773
+ #: polls-options.php:238
774
+ #: polls-options.php:263
775
  msgid "Descending"
776
  msgstr ""
777
 
778
+ #: polls-options.php:245
779
  msgid "Sorting Of Poll Results"
780
  msgstr ""
781
 
782
+ #: polls-options.php:248
783
  msgid "Sort Poll Results By:"
784
  msgstr ""
785
 
786
+ #: polls-options.php:251
787
+ #: polls-templates.php:116
788
+ #: polls-templates.php:119
789
+ #: wp-polls.php:1367
790
+ #: wp-polls.php:1368
791
  msgid "Votes"
792
  msgstr ""
793
 
794
+ #: polls-options.php:259
795
  msgid "Sort Order Of Poll Results:"
796
  msgstr ""
797
 
798
+ #: polls-options.php:270
799
  msgid "Allow To Vote"
800
  msgstr ""
801
 
802
+ #: polls-options.php:273
803
  msgid "Who Is Allowed To Vote?"
804
  msgstr ""
805
 
806
+ #: polls-options.php:276
807
  msgid "Guests Only"
808
  msgstr ""
809
 
810
+ #: polls-options.php:277
811
  msgid "Registered Users Only"
812
  msgstr ""
813
 
814
+ #: polls-options.php:278
815
  msgid "Registered Users And Guests"
816
  msgstr ""
817
 
818
+ #: polls-options.php:288
819
  msgid "Poll Logging Method:"
820
  msgstr ""
821
 
822
+ #: polls-options.php:291
823
  msgid "Do Not Log"
824
  msgstr ""
825
 
826
+ #: polls-options.php:292
827
  msgid "Logged By Cookie"
828
  msgstr ""
829
 
830
+ #: polls-options.php:293
831
  msgid "Logged By IP"
832
  msgstr ""
833
 
834
+ #: polls-options.php:294
835
  msgid "Logged By Cookie And IP"
836
  msgstr ""
837
 
838
+ #: polls-options.php:295
839
  msgid "Logged By Username"
840
  msgstr ""
841
 
842
+ #: polls-options.php:300
843
+ msgid "Expiry Time For Cookie And Log:"
844
+ msgstr ""
845
+
846
+ #: polls-options.php:301
847
+ msgid "seconds (0 to disable)"
848
+ msgstr ""
849
+
850
+ #: polls-options.php:306
851
  msgid "Poll Archive"
852
  msgstr ""
853
 
854
+ #: polls-options.php:309
855
  msgid "Number Of Polls Per Page:"
856
  msgstr ""
857
 
858
+ #: polls-options.php:313
859
  msgid "Type Of Polls To Display In Poll Archive:"
860
  msgstr ""
861
 
862
+ #: polls-options.php:316
863
  msgid "Closed Polls Only"
864
  msgstr ""
865
 
866
+ #: polls-options.php:317
867
  msgid "Opened Polls Only"
868
  msgstr ""
869
 
870
+ #: polls-options.php:318
871
  msgid "Closed And Opened Polls"
872
  msgstr ""
873
 
874
+ #: polls-options.php:323
875
  msgid "Poll Archive URL:"
876
  msgstr ""
877
 
878
+ #: polls-options.php:327
879
  msgid "Display Poll Archive Link Below Poll?"
880
  msgstr ""
881
 
882
+ #: polls-options.php:336
883
+ #: polls-options.php:374
884
+ msgid "Note"
885
  msgstr ""
886
 
 
887
  #: polls-options.php:337
888
+ msgid "Only polls' results will be shown in the Poll Archive regardless of whether the poll is closed or opened."
889
+ msgstr ""
890
+
891
+ #: polls-options.php:342
892
+ #: polls-options.php:345
893
+ #: wp-polls-widget.php:114
894
  msgid "Current Active Poll"
895
  msgstr ""
896
 
897
+ #: polls-options.php:348
898
+ #: wp-polls-widget.php:120
899
  msgid "Do NOT Display Poll (Disable)"
900
  msgstr ""
901
 
902
+ #: polls-options.php:349
903
+ #: wp-polls-widget.php:125
904
  msgid "Display Random Poll"
905
  msgstr ""
906
 
907
+ #: polls-options.php:350
908
+ #: wp-polls-widget.php:130
909
  msgid "Display Latest Poll"
910
  msgstr ""
911
 
912
+ #: polls-options.php:352
913
+ #: wp-polls-widget.php:135
914
  msgid "Display Multiple Polls"
915
  msgstr ""
916
 
917
+ #: polls-options.php:375
918
+ msgid "If you chose 'Display Multiple Polls' for the above option, you need to configure it in Presentation -> Widgets -> Poll."
919
  msgstr ""
920
 
921
+ #: polls-options.php:379
922
  msgid "When Poll Is Closed"
923
  msgstr ""
924
 
925
+ #: polls-options.php:382
926
  msgid "Display Poll's Results"
927
  msgstr ""
928
 
929
+ #: polls-options.php:383
930
+ msgid "Display Disabled Poll's Voting Form"
931
+ msgstr ""
932
+
933
+ #: polls-options.php:384
934
  msgid "Do Not Display Poll In Post/Sidebar"
935
  msgstr ""
936
 
937
+ #: polls-options.php:392
938
+ #: polls-templates.php:492
939
+ msgid "Save Changes"
940
  msgstr ""
941
 
942
+ #: polls-templates.php:66
943
  msgid "Voting Form Header Template"
944
  msgstr ""
945
 
946
+ #: polls-templates.php:67
947
  msgid "Voting Form Body Template"
948
  msgstr ""
949
 
950
+ #: polls-templates.php:68
951
  msgid "Voting Form Footer Template"
952
  msgstr ""
953
 
954
+ #: polls-templates.php:69
955
  msgid "Result Header Template"
956
  msgstr ""
957
 
958
+ #: polls-templates.php:70
959
  msgid "Result Body Template"
960
  msgstr ""
961
 
962
+ #: polls-templates.php:71
963
  msgid "Result Body2 Template"
964
  msgstr ""
965
 
966
+ #: polls-templates.php:72
967
  msgid "Result Footer Template"
968
  msgstr ""
969
 
970
+ #: polls-templates.php:73
971
  msgid "Result Footer2 Template"
972
  msgstr ""
973
 
974
+ #: polls-templates.php:74
975
  msgid "Poll Archive Link Template"
976
  msgstr ""
977
 
978
+ #: polls-templates.php:75
979
  msgid "Poll Archive Poll Header Template"
980
  msgstr ""
981
 
982
+ #: polls-templates.php:76
983
  msgid "Poll Archive Poll Footer Template"
984
  msgstr ""
985
 
986
+ #: polls-templates.php:77
987
+ msgid "Poll Archive Paging Header Template"
988
+ msgstr ""
989
+
990
+ #: polls-templates.php:78
991
+ msgid "Poll Archive Paging Footer Template"
992
+ msgstr ""
993
+
994
+ #: polls-templates.php:79
995
  msgid "Poll Disabled Template"
996
  msgstr ""
997
 
998
+ #: polls-templates.php:80
999
  msgid "Poll Error Template"
1000
  msgstr ""
1001
 
1002
+ #: polls-templates.php:110
1003
+ #: polls-templates.php:125
1004
+ #: wp-polls.php:1361
1005
+ #: wp-polls.php:1374
1006
  msgid "Vote"
1007
  msgstr ""
1008
 
1009
+ #: polls-templates.php:110
1010
+ #: wp-polls.php:1362
1011
  msgid "View Results Of This Poll"
1012
  msgstr ""
1013
 
1014
+ #: polls-templates.php:110
1015
+ #: wp-polls.php:1362
1016
  msgid "View Results"
1017
  msgstr ""
1018
 
1019
+ #: polls-templates.php:119
1020
+ #: wp-polls.php:1368
1021
  msgid "You Have Voted For This Choice"
1022
  msgstr ""
1023
 
1024
+ #: polls-templates.php:125
1025
+ #: wp-polls.php:1374
1026
  msgid "Vote For This Poll"
1027
  msgstr ""
1028
 
1029
+ #: polls-templates.php:128
1030
+ #: wp-polls.php:1401
 
1031
  msgid "Polls Archive"
1032
  msgstr ""
1033
 
1034
+ #: polls-templates.php:134
1035
  msgid "Start Date:"
1036
  msgstr ""
1037
 
1038
+ #: polls-templates.php:134
1039
  msgid "End Date:"
1040
  msgstr ""
1041
 
1042
+ #: polls-templates.php:143
1043
+ #: wp-polls.php:1376
1044
  msgid "Sorry, there are no polls available at the moment."
1045
  msgstr ""
1046
 
1047
+ #: polls-templates.php:146
1048
+ #: wp-polls.php:1377
1049
  msgid "An error has occurred when processing your poll."
1050
  msgstr ""
1051
 
1052
+ #: polls-templates.php:156
1053
+ #: wp-polls.php:61
1054
  msgid "Poll Templates"
1055
  msgstr ""
1056
 
1057
+ #: polls-templates.php:158
1058
  msgid "Template Variables"
1059
  msgstr ""
1060
 
1061
+ #: polls-templates.php:163
1062
  msgid "Display the poll's ID"
1063
  msgstr ""
1064
 
1065
+ #: polls-templates.php:167
1066
  msgid "Display the poll's answer ID"
1067
  msgstr ""
1068
 
1069
+ #: polls-templates.php:173
1070
  msgid "Display the poll's question"
1071
  msgstr ""
1072
 
1073
+ #: polls-templates.php:177
1074
  msgid "Display the poll's answer"
1075
  msgstr ""
1076
 
1077
+ #: polls-templates.php:183
1078
  msgid "Display the poll's total votes NOT the number of people who voted for the poll"
1079
  msgstr ""
1080
 
1081
+ #: polls-templates.php:187
1082
  msgid "Display the poll's answer without HTML formatting."
1083
  msgstr ""
1084
 
1085
+ #: polls-templates.php:193
1086
  msgid "Displays URL to poll's result"
1087
  msgstr ""
1088
 
1089
+ #: polls-templates.php:197
1090
  msgid "Display the poll's answer votes"
1091
  msgstr ""
1092
 
1093
+ #: polls-templates.php:203
1094
  msgid "Display the poll's most voted answer"
1095
  msgstr ""
1096
 
1097
+ #: polls-templates.php:207
1098
  msgid "Display the poll's answer percentage"
1099
  msgstr ""
1100
 
1101
+ #: polls-templates.php:213
1102
  msgid "Display the poll's answer votes for the most voted answer"
1103
  msgstr ""
1104
 
1105
+ #: polls-templates.php:217
1106
  msgid "Display the poll's answer image width"
1107
  msgstr ""
1108
 
1109
+ #: polls-templates.php:223
1110
  msgid "Display the poll's answer percentage for the most voted answer"
1111
  msgstr ""
1112
 
1113
+ #: polls-templates.php:227
1114
  msgid "Display the poll's least voted answer"
1115
  msgstr ""
1116
 
1117
+ #: polls-templates.php:233
1118
  msgid "Display the poll's start date/time"
1119
  msgstr ""
1120
 
1121
+ #: polls-templates.php:237
1122
  msgid "Display the poll's answer votes for the least voted answer"
1123
  msgstr ""
1124
 
1125
+ #: polls-templates.php:243
1126
  msgid "Display the poll's end date/time"
1127
  msgstr ""
1128
 
1129
+ #: polls-templates.php:247
1130
  msgid "Display the poll's answer percentage for the least voted answer"
1131
  msgstr ""
1132
 
1133
+ #: polls-templates.php:253
1134
  msgid "Display the the maximum number of answers the user can choose if the poll supports multiple answers"
1135
  msgstr ""
1136
 
1137
+ #: polls-templates.php:257
1138
  msgid "Display \"checkbox\" or \"radio\" input types depending on the poll type"
1139
  msgstr ""
1140
 
1141
+ #: polls-templates.php:263
1142
  msgid "Display the number of people who voted for the poll NOT the total votes of the poll"
1143
  msgstr ""
1144
 
1145
+ #: polls-templates.php:267
1146
  msgid "Display the poll archive URL"
1147
  msgstr ""
1148
 
1149
+ #: polls-templates.php:272
1150
+ msgid "Note: <strong>%POLL_TOTALVOTES%</strong> and <strong>%POLL_TOTALVOTERS%</strong> will be different if your poll supports multiple answers. If your poll allows only single answer, both value will be the same."
 
 
 
 
1151
  msgstr ""
1152
 
1153
+ #: polls-templates.php:278
1154
  msgid "Poll Voting Form Templates"
1155
  msgstr ""
1156
 
1157
+ #: polls-templates.php:282
1158
  msgid "Voting Form Header:"
1159
  msgstr ""
1160
 
1161
+ #: polls-templates.php:283
1162
+ #: polls-templates.php:298
1163
+ #: polls-templates.php:311
1164
+ #: polls-templates.php:327
1165
+ #: polls-templates.php:342
1166
+ #: polls-templates.php:356
1167
+ #: polls-templates.php:370
1168
+ #: polls-templates.php:390
1169
+ #: polls-templates.php:415
1170
+ #: polls-templates.php:424
1171
+ #: polls-templates.php:433
1172
+ #: polls-templates.php:452
1173
+ #: polls-templates.php:461
1174
+ #: polls-templates.php:475
1175
+ #: polls-templates.php:484
1176
  msgid "Allowed Variables:"
1177
  msgstr ""
1178
 
1179
+ #: polls-templates.php:291
 
1180
  #: polls-templates.php:304
1181
+ #: polls-templates.php:315
1182
+ #: polls-templates.php:335
1183
+ #: polls-templates.php:349
1184
+ #: polls-templates.php:363
1185
+ #: polls-templates.php:383
1186
+ #: polls-templates.php:403
1187
+ #: polls-templates.php:417
1188
+ #: polls-templates.php:426
1189
+ #: polls-templates.php:445
1190
+ #: polls-templates.php:454
1191
+ #: polls-templates.php:463
1192
+ #: polls-templates.php:477
1193
+ #: polls-templates.php:486
1194
  msgid "Restore Default Template"
1195
  msgstr ""
1196
 
1197
+ #: polls-templates.php:297
1198
  msgid "Voting Form Body:"
1199
  msgstr ""
1200
 
1201
+ #: polls-templates.php:310
1202
  msgid "Voting Form Footer:"
1203
  msgstr ""
1204
 
1205
+ #: polls-templates.php:322
1206
  msgid "Poll Result Templates"
1207
  msgstr ""
1208
 
1209
+ #: polls-templates.php:326
1210
  msgid "Result Header:"
1211
  msgstr ""
1212
 
1213
+ #: polls-templates.php:341
1214
+ #: polls-templates.php:355
1215
  msgid "Result Body:"
1216
  msgstr ""
1217
 
1218
+ #: polls-templates.php:341
1219
+ #: polls-templates.php:389
1220
  msgid "Displayed When The User HAS NOT Voted"
1221
  msgstr ""
1222
 
1223
+ #: polls-templates.php:355
1224
+ #: polls-templates.php:369
1225
  msgid "Displayed When The User HAS Voted"
1226
  msgstr ""
1227
 
1228
+ #: polls-templates.php:369
1229
+ #: polls-templates.php:389
1230
  msgid "Result Footer:"
1231
  msgstr ""
1232
 
1233
+ #: polls-templates.php:410
1234
  msgid "Poll Archive Templates"
1235
  msgstr ""
1236
 
1237
+ #: polls-templates.php:414
1238
  msgid "Poll Archive Link"
1239
  msgstr ""
1240
 
1241
+ #: polls-templates.php:414
1242
  msgid "Template For Displaying Poll Archive Link"
1243
  msgstr ""
1244
 
1245
+ #: polls-templates.php:423
1246
  msgid "Individual Poll Header"
1247
  msgstr ""
1248
 
1249
+ #: polls-templates.php:423
1250
  msgid "Displayed Before Each Poll In The Poll Archive"
1251
  msgstr ""
1252
 
1253
+ #: polls-templates.php:425
1254
+ #: polls-templates.php:453
1255
+ #: polls-templates.php:462
1256
+ #: polls-templates.php:476
1257
+ #: polls-templates.php:485
1258
  msgid "N/A"
1259
  msgstr ""
1260
 
1261
+ #: polls-templates.php:432
1262
  msgid "Individual Poll Footer"
1263
  msgstr ""
1264
 
1265
+ #: polls-templates.php:432
1266
  msgid "Displayed After Each Poll In The Poll Archive"
1267
  msgstr ""
1268
 
1269
+ #: polls-templates.php:451
1270
+ msgid "Paging Header"
1271
+ msgstr ""
1272
+
1273
+ #: polls-templates.php:451
1274
+ msgid "Displayed Before Paging In The Poll Archive"
1275
+ msgstr ""
1276
+
1277
+ #: polls-templates.php:460
1278
+ msgid "Paging Footer"
1279
+ msgstr ""
1280
+
1281
+ #: polls-templates.php:460
1282
+ msgid "Displayed After Paging In The Poll Archive"
1283
+ msgstr ""
1284
+
1285
+ #: polls-templates.php:470
1286
  msgid "Poll Misc Templates"
1287
  msgstr ""
1288
 
1289
+ #: polls-templates.php:474
1290
  msgid "Poll Disabled"
1291
  msgstr ""
1292
 
1293
+ #: polls-templates.php:474
1294
  msgid "Displayed When The Poll Is Disabled"
1295
  msgstr ""
1296
 
1297
+ #: polls-templates.php:483
1298
  msgid "Poll Error"
1299
  msgstr ""
1300
 
1301
+ #: polls-templates.php:483
1302
  msgid "Displayed When An Error Has Occured While Processing The Poll"
1303
  msgstr ""
1304
 
 
 
 
 
1305
  #: polls-uninstall.php:39
1306
+ #: polls-uninstall.php:133
1307
  msgid "UNINSTALL WP-Polls"
1308
  msgstr ""
1309
 
1324
 
1325
  #: polls-uninstall.php:81
1326
  #: polls-uninstall.php:91
1327
+ #: wp-polls.php:62
1328
  msgid "Uninstall WP-Polls"
1329
  msgstr ""
1330
 
1349
  msgid "The following WordPress Options/Tables will be DELETED:"
1350
  msgstr ""
1351
 
1352
+ #: polls-uninstall.php:105
1353
  msgid "WordPress Options"
1354
  msgstr ""
1355
 
1356
+ #: polls-uninstall.php:106
1357
  msgid "WordPress Tables"
1358
  msgstr ""
1359
 
1360
  #: polls-uninstall.php:131
1361
+ msgid "Do you really want to uninstall WP-Polls?"
1362
+ msgstr ""
1363
+
1364
+ #: polls-uninstall.php:133
1365
  msgid ""
1366
  "You Are About To Uninstall WP-Polls From WordPress.\\n"
1367
  "This Action Is Not Reversible.\\n"
1369
  " Choose [Cancel] To Stop, [OK] To Uninstall."
1370
  msgstr ""
1371
 
1372
+ #: wp-polls-widget.php:64
1373
+ #: wp-polls.php:55
1374
+ msgid "Polls"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1375
  msgstr ""
1376
 
1377
+ #: wp-polls-widget.php:96
1378
+ msgid "Title"
1379
  msgstr ""
1380
 
1381
+ #: wp-polls-widget.php:99
1382
+ msgid "Display Polls Archive Link Below Poll?"
1383
  msgstr ""
1384
 
1385
+ #: wp-polls-widget.php:159
1386
+ msgid "Select Multiple Polls"
1387
  msgstr ""
1388
 
1389
+ #: wp-polls.php:170
1390
+ msgid "Your last request is still being processed. Please wait a while ..."
1391
  msgstr ""
1392
 
1393
+ #: wp-polls.php:171
1394
+ msgid "Please choose a valid poll answer."
1395
  msgstr ""
1396
 
1397
+ #: wp-polls.php:172
1398
+ msgid "Maximum number of choices allowed:"
1399
  msgstr ""
1400
 
1401
+ #: wp-polls.php:219
1402
+ msgid "Please check the \\'Yes\\' checkbox if you want to delete all logs."
 
1403
  msgstr ""
1404
 
1405
+ #: wp-polls.php:221
1406
+ msgid "Please check the \\'Yes\\' checkbox if you want to delete all logs for this poll ONLY."
1407
  msgstr ""
1408
 
1409
+ #: wp-polls.php:225
1410
+ msgid "Enter Poll ID"
1411
  msgstr ""
1412
 
1413
+ #: wp-polls.php:226
1414
+ msgid "Error: Poll ID must be numeric"
1415
  msgstr ""
1416
 
1417
+ #: wp-polls.php:226
1418
+ msgid "Please enter Poll ID again"
1419
  msgstr ""
1420
 
1421
+ #: wp-polls.php:242
1422
+ #: wp-polls.php:248
1423
  msgid "Poll"
1424
  msgstr ""
1425
 
1426
+ #: wp-polls.php:249
1427
  msgid "Insert Poll"
1428
  msgstr ""
1429
 
1430
+ #: wp-polls.php:485
1431
+ #: wp-polls.php:645
1432
  msgid "Loading"
1433
  msgstr ""
1434
 
1435
+ #: wp-polls.php:691
1436
  msgid "Note: There is a poll embedded within this post, please visit the site to participate in this post's poll."
1437
  msgstr ""
1438
 
1439
+ #: wp-polls.php:1041
1440
+ #, php-format
1441
+ msgid "Page %s of %s"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1442
  msgstr ""
1443
 
1444
+ #: wp-polls.php:1043
1445
+ msgid "&laquo; First"
 
1446
  msgstr ""
1447
 
1448
+ #: wp-polls.php:1047
1449
+ msgid "&laquo;"
1450
  msgstr ""
1451
 
1452
+ #: wp-polls.php:1057
1453
+ msgid "&raquo;"
1454
  msgstr ""
1455
 
1456
+ #: wp-polls.php:1061
1457
+ msgid "Last &raquo;"
1458
  msgstr ""
1459
 
1460
+ #: wp-polls.php:1239
1461
  #, php-format
1462
  msgid "Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s"
1463
  msgstr ""
1464
 
1465
+ #: wp-polls.php:1243
1466
  #, php-format
1467
  msgid "You Had Already Voted For This Poll. Poll ID #%s"
1468
  msgstr ""
1469
 
1470
+ #: wp-polls.php:1247
1471
  #, php-format
1472
  msgid "Invalid Poll ID. Poll ID #%s"
1473
  msgstr ""
1474
 
1475
+ #: wp-polls.php:1275
1476
+ #: wp-polls.php:1277
1477
+ #: wp-polls.php:1287
1478
  msgid "WP-Polls"
1479
  msgstr ""
1480
 
1481
+ #: wp-polls.php:1289
1482
  msgid "polls were created."
1483
  msgstr ""
1484
 
1485
+ #: wp-polls.php:1290
1486
  msgid "polls' answers were given."
1487
  msgstr ""
1488
 
1489
+ #: wp-polls.php:1291
1490
  msgid "votes were casted."
1491
  msgstr ""
1492
 
1493
+ #: wp-polls.php:1345
1494
  msgid "How Is My Site?"
1495
  msgstr ""
1496
 
1497
+ #: wp-polls.php:1348
1498
  msgid "Good"
1499
  msgstr ""
1500
 
1501
+ #: wp-polls.php:1349
1502
  msgid "Excellent"
1503
  msgstr ""
1504
 
1505
+ #: wp-polls.php:1350
1506
  msgid "Bad"
1507
  msgstr ""
1508
 
1509
+ #: wp-polls.php:1351
1510
  msgid "Can Be Improved"
1511
  msgstr ""
1512
 
1513
+ #: wp-polls.php:1352
1514
  msgid "No Comments"
1515
  msgstr ""
1516