Changeset 35561
- Timestamp:
- 03/20/08 08:12:09 (4 months ago)
- Location:
- wp-polls/trunk
- Files:
-
- 9 modified
-
polls-add.php (modified) (9 diffs)
-
polls-admin-ajax.php (modified) (1 diff)
-
polls-css.css (modified) (1 diff)
-
polls-js.js (modified) (1 diff)
-
polls-logs.php (modified) (14 diffs)
-
polls-manager.php (modified) (11 diffs)
-
polls-options.php (modified) (2 diffs)
-
wp-polls.mo (modified) (previous)
-
wp-polls.pot (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-polls/trunk/polls-add.php
r22648 r35561 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2. 3Plugin: WP-Polls 2.30 |6 | Copyright (c) 200 7Lester "GaMerZ" Chan |5 | WordPress 2.5 Plugin: WP-Polls 2.30 | 6 | Copyright (c) 2008 Lester "GaMerZ" Chan | 7 7 | | 8 8 | File Written By: | … … 119 119 // Create Elements 120 120 var poll_tr = document.createElement("tr"); 121 var poll_td1 = document.createElement("t d");121 var poll_td1 = document.createElement("th"); 122 122 var poll_td2 = document.createElement("td"); 123 123 var poll_answer = document.createElement("input"); 124 var poll_answer_count = document.createTextNode("<?php _e('Answer', 'wp-polls'); ?> " + (count_poll_answer+1) + ":");124 var poll_answer_count = document.createTextNode("<?php _e('Answer', 'wp-polls'); ?> " + (count_poll_answer+1)); 125 125 var poll_answer_bold = document.createElement("strong"); 126 126 var poll_option = document.createElement("option"); … … 135 135 poll_option.setAttribute('id', "pollq-multiple-" + (count_poll_answer+1)); 136 136 // Elements - TD/TR 137 if(count_poll_answer%2 != 0) { poll_tr.style.background = "#eee"; }138 137 poll_tr.setAttribute('id', "poll-answer-" + count_poll_answer); 139 138 poll_td1.setAttribute('width', "20%"); 139 poll_td1.setAttribute('scope', "row"); 140 140 poll_td2.setAttribute('width', "80%"); 141 141 // Appending … … 169 169 /* ]]> */ 170 170 </script> 171 <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade">'.stripslashes($text).'</div>'; } ?>172 171 <form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>" method="post"> 173 172 <div class="wrap"> 174 173 <h2><?php _e('Add Poll', 'wp-polls'); ?></h2> 174 175 <?php if(!empty($text)) { echo '<!-- Last Action --><br class="clear" /><div id="message" class="updated fade">'.stripslashes($text).'</div>'; } ?> 176 175 177 <!-- Poll Question --> 176 178 <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 <t d width="20%"><strong><?php _e('Question:', 'wp-polls') ?></strong></td>179 <table class="form-table"> 180 <tr> 181 <th width="20%" scope="row" valign="top"><?php _e('Question', 'wp-polls') ?></th> 180 182 <td width="80%"><input type="text" size="70" name="pollq_question" value="" /></td> 181 183 </tr> … … 183 185 <!-- Poll Answers --> 184 186 <h3><?php _e('Poll Answers', 'wp-polls'); ?></h3> 185 <table width="100%" border="0" cellspacing="3" cellpadding="3">187 <table class="form-table"> 186 188 <tfoot> 187 189 <tr> … … 193 195 <?php 194 196 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"; 197 echo "<tr id=\"poll-answer-$i\">\n"; 198 echo "<th width=\"20%\" scope=\"row\" valign=\"top\">".sprintf(__('Answer %s', 'wp-polls'), $i)."</th>\n"; 202 199 echo "<td width=\"80%\"><input type=\"text\" size=\"50\" name=\"polla_answers[]\" /></td>\n"; 203 200 echo "</tr>\n"; … … 209 206 <!-- Poll Multiple Answers --> 210 207 <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 <t d width="40%" valign="top"><strong><?php _e('Allows Users To Select More Than One Answer?', 'wp-polls'); ?></strong></td>208 <table class="form-table"> 209 <tr> 210 <th width="40%" scope="row" valign="top"><?php _e('Allows Users To Select More Than One Answer?', 'wp-polls'); ?></th> 214 211 <td width="60%"> 215 212 <select name="pollq_multiple_yes" id="pollq_multiple_yes" size="1" onchange="check_pollq_multiple();"> … … 220 217 </tr> 221 218 <tr> 222 <t d width="40%" valign="top"><strong><?php _e('Maximum Number Of Selected Answers Allowed?', 'wp-polls') ?></strong></td>219 <th width="40%" scope="row" valign="top"><?php _e('Maximum Number Of Selected Answers Allowed?', 'wp-polls') ?></th> 223 220 <td width="60%"> 224 221 <select name="pollq_multiple" id="pollq_multiple" size="1" disabled="disabled"> … … 234 231 <!-- Poll Start/End Date --> 235 232 <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 <t d width="20%"><strong><?php _e('Start Date/Time:', 'wp-polls') ?></strong></td>233 <table class="form-table"> 234 <tr> 235 <th width="20%" scope="row" valign="top"><?php _e('Start Date/Time', 'wp-polls') ?></th> 239 236 <td width="80%"><?php poll_timestamp(current_time('timestamp')); ?></td> 240 237 </tr> 241 238 <tr> 242 <t d width="20%" valign="top"><strong><?php _e('End Date/Time:', 'wp-polls') ?></strong></td>239 <th width="20%" scope="row" valign="top"><?php _e('End Date/Time', 'wp-polls') ?></th> 243 240 <td width="80%"><input type="checkbox" name="pollq_expiry_no" id="pollq_expiry_no" value="1" checked="checked" onclick="check_pollexpiry();" /> <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 241 </tr> -
wp-polls/trunk/polls-admin-ajax.php
r22648 r35561 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2. 3Plugin: WP-Polls 2.30 |6 | Copyright (c) 200 7Lester "GaMerZ" Chan |5 | WordPress 2.5 Plugin: WP-Polls 2.30 | 6 | Copyright (c) 2008 Lester "GaMerZ" Chan | 7 7 | | 8 8 | File Written By: | -
wp-polls/trunk/polls-css.css
r22648 r35561 2 2 +----------------------------------------------------------------+ 3 3 | | 4 | WordPress 2. 3Plugin: WP-Polls 2.30 |5 | Copyright (c) 200 7Lester "GaMerZ" Chan |4 | WordPress 2.5 Plugin: WP-Polls 2.30 | 5 | Copyright (c) 2008 Lester "GaMerZ" Chan | 6 6 | | 7 7 | File Written By: | -
wp-polls/trunk/polls-js.js
r26538 r35561 2 2 +----------------------------------------------------------------+ 3 3 | | 4 | WordPress 2. 3Plugin: WP-Polls 2.30 |5 | Copyright (c) 200 7Lester "GaMerZ" Chan |4 | WordPress 2.5 Plugin: WP-Polls 2.30 | 5 | Copyright (c) 2008 Lester "GaMerZ" Chan | 6 6 | | 7 7 | File Written By: | -
wp-polls/trunk/polls-logs.php
r31879 r35561 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2. 3Plugin: WP-Polls 2.30 |6 | Copyright (c) 200 7Lester "GaMerZ" Chan |5 | WordPress 2.5 Plugin: WP-Polls 2.30 | 6 | Copyright (c) 2008 Lester "GaMerZ" Chan | 7 7 | | 8 8 | File Written By: | … … 119 119 } 120 120 ?> 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 121 <div class="wrap"> 123 122 <h2><?php _e('Poll\'s Logs', 'wp-polls'); ?></h2> 124 <p><strong><?php echo $poll_question; ?></strong></p> 123 <?php if(!empty($text)) { echo '<!-- Last Action --><br class="clear" /><div id="message" class="updated fade">'.stripslashes($text).'</div>'; } else { echo '<br class="clear" /><div id="message" class="updated" style="display: none;"></div>'; } ?> 124 <h3><?php echo $poll_question; ?></h3> 125 125 <p> 126 126 <?php printf(__('There are a total of <strong>%s</strong> recorded votes for this poll.', 'wp-polls'), number_format_i18n($poll_totalrecorded)); ?><br /> … … 138 138 <form method="post" action="<?php echo htmlspecialchars($base_page); ?>&mode=logs&id=<?php echo $poll_id; ?>"> 139 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> 140 <table class="form-table"> 141 <tr> 142 <th scope="row" valign="top"><?php _e('Display All Users That Voted For', 'wp-polls'); ?></th> 145 143 <td> 146 144 <select name="users_voted_for" size="1"> … … 163 161 </tr> 164 162 <tr> 165 <td valign="top"> 166 <strong><?php _e('Voters To EXCLUDE', 'wp-polls'); ?></strong> 167 </td> 163 <th scope="row" valign="top"><?php _e('Voters To EXCLUDE', 'wp-polls'); ?></th> 168 164 <td> 169 165 <input type="checkbox" id="exclude_registered_1" name="exclude_registered" value="1" <?php checked('1', $exclude_registered); ?> /> <label for="exclude_registered_1"><?php _e('Registered Users', 'wp-polls'); ?></label><br /> … … 182 178 <form method="post" action="<?php echo htmlspecialchars($base_page); ?>&mode=logs&id=<?php echo $poll_id; ?>"> 183 179 <p style="display: none;"><input type="hidden" name="filter" value="2" /></p> 184 <table border="0" cellspacing="3" cellpadding="3">180 <table class="form-table"> 185 181 <tr> 186 <td> 187 <strong><?php _e('Display Users That Voted For: ', 'wp-polls'); ?></strong> 188 </td> 182 <th scope="row" valign="top"><?php _e('Display Users That Voted For', 'wp-polls'); ?></th> 189 183 <td> 190 184 <select name="num_choices_sign" size="1"> … … 214 208 </tr> 215 209 <tr> 216 <td valign="top"> 217 <strong><?php _e('Voters To EXCLUDE', 'wp-polls'); ?></strong> 218 </td> 210 <th scope="row" valign="top"><?php _e('Voters To EXCLUDE', 'wp-polls'); ?></th> 219 211 <td> 220 212 <input type="checkbox" id="exclude_registered_2" name="exclude_registered_2" value="1" <?php checked('1', $exclude_registered_2); ?> /> <label for="exclude_registered_2"><?php _e('Registered Users', 'wp-polls'); ?></label><br /> … … 238 230 <form method="post" action="<?php echo htmlspecialchars($base_page); ?>&mode=logs&id=<?php echo $poll_id; ?>"> 239 231 <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> 232 <table class="form-table"> 233 <tr> 234 <th scope="row" valign="top"><?php _e('Display What This User Has Voted', 'wp-polls'); ?></th> 245 235 <td> 246 236 <select name="what_user_voted" size="1"> … … 268 258 <?php } // End if($poll_multiple > -1) ?> 269 259 </td> 270 <td> 271 <input type="button" value="<?php _e('Clear Filter', 'wp-polls'); ?>" onclick="self.location.href = '<?php echo htmlspecialchars($base_page); ?>&mode=logs&id=<?php echo $poll_id; ?>';" class="button" /> 272 </td> 260 <td align="center"><input type="button" value="<?php _e('Clear Filter', 'wp-polls'); ?>" onclick="self.location.href = '<?php echo htmlspecialchars($base_page); ?>&mode=logs&id=<?php echo $poll_id; ?>';" class="button" /></td> 273 261 </tr> 274 262 </table> 275 263 </div> 264 <p> </p> 276 265 <?php } // End if($poll_totalrecorded > 0) ?> 277 266 <div class="wrap"> … … 283 272 echo '<p>'.__('This default filter is limited to display only <strong>100</strong> records.', 'wp-polls').'</p>'; 284 273 } 285 echo '<table width="100%" border="0" cellspacing="3" cellpadding="3">'."\n";274 echo '<table class="widefat">'."\n"; 286 275 $k = 1; 287 276 $j = 0; … … 301 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)); 302 291 if($i%2 == 0) { 303 $style = ' style=\'background-color: none\'';292 $style = ''; 304 293 } else { 305 $style = ' style=\'background-color: #eee\'';294 $style = 'class="alternate"'; 306 295 } 307 296 if($pollip_user != $temp_pollip_user) { 308 echo '<tr style="background-color: #b8d4ff">'."\n";297 echo '<tr class="highlight">'."\n"; 309 298 echo "<td colspan=\"4\"><strong>".__('User', 'wp-polls')." $k: $pollip_user</strong></td>\n"; 310 299 echo '</tr>'; … … 330 319 if($pollip_aid != $poll_last_aid) { 331 320 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";321 echo "<tr class=\"highlight\">\n<td colspan=\"4\"><strong>$pollip_answers[$pollip_aid]</strong></td>\n</tr>\n"; 333 322 } 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";323 echo "<tr class=\"highlight\">\n<td colspan=\"4\"><strong>".__('Answer', 'wp-polls')." $k: $pollip_answers[$pollip_aid]</strong></td>\n</tr>\n"; 335 324 $k++; 336 325 } … … 344 333 } 345 334 if($i%2 == 0) { 346 $style = ' style=\'background-color: none\'';335 $style = ''; 347 336 } else { 348 $style = ' style=\'background-color: #eee\'';337 $style = 'class="alternate"'; 349 338 } 350 339 echo "<tr $style>\n"; … … 359 348 } 360 349 } 361 echo "<tr class=\" thead\">\n";350 echo "<tr class=\"highlight\">\n"; 362 351 echo "<td colspan=\"4\">".sprintf(__('Total number of records that matches this filter: <strong>%s</strong>', 'wp-polls'), number_format_i18n($j))."</td>"; 363 352 echo "</tr>\n"; … … 367 356 </div> 368 357 <?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>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> 370 359 <?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>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> 372 361 <?php } ?> 373 362 </div> 363 <p> </p> 374 364 375 365 <!-- Delete Poll Logs --> 376 366 <div class="wrap"> 377 367 <h2><?php _e('Delete Poll Logs', 'wp-polls'); ?></h2> 368 <br class="clear" /> 378 369 <div align="center" id="poll_logs"> 379 370 <?php if($poll_logs_count) { ?> -
wp-polls/trunk/polls-manager.php
r35511 r35561 230 230 // Create Elements 231 231 var poll_tr = document.createElement("tr"); 232 var poll_td1 = document.createElement("t d");232 var poll_td1 = document.createElement("th"); 233 233 var poll_td2 = document.createElement("td"); 234 234 var poll_td3 = document.createElement("td"); 235 235 var poll_answer = document.createElement("input"); 236 236 var poll_votes = document.createElement("input"); 237 var poll_answer_count = document.createTextNode("<?php _e('Answer', 'wp-polls'); ?> " + (count_poll_answer+1) + ":");237 var poll_answer_count = document.createTextNode("<?php _e('Answer', 'wp-polls'); ?> " + (count_poll_answer+1)); 238 238 var poll_votes_count = document.createTextNode("0 "); 239 239 var poll_answer_bold = document.createElement("strong"); … … 257 257 poll_tr.setAttribute('id', "poll-answer-new-" + count_poll_answer_new); 258 258 poll_td1.setAttribute('width', "20%"); 259 poll_td1.setAttribute('scope', "row"); 260 poll_td1.setAttribute('valign', "top"); 259 261 poll_td2.setAttribute('width', "60%"); 260 poll_td3.setAttribute('width', " 10%");262 poll_td3.setAttribute('width', "20%"); 261 263 poll_td3.setAttribute('align', "right"); 262 264 // Appending To Elements … … 303 305 <h2><?php _e('Edit Poll', 'wp-polls'); ?></h2> 304 306 305 <?php if(!empty($text)) { echo '<!-- Last Action --><br class="clear" /><div id="message" class="updated fade">'.stripslashes($text).'</div>'; } else { echo '< div id="message" class="updated" style="display: none;"></div>'; } ?>307 <?php if(!empty($text)) { echo '<!-- Last Action --><br class="clear" /><div id="message" class="updated fade">'.stripslashes($text).'</div>'; } else { echo '<br class="clear" /><div id="message" class="updated" style="display: none;"></div>'; } ?> 306 308 307 309 <!-- Poll Question --> … … 309 311 <table class="form-table"> 310 312 <tr> 311 <th scope="row" valign="top"><?php _e('Question', 'wp-polls') ?></th>313 <th width="20%" scope="row" valign="top"><?php _e('Question', 'wp-polls') ?></th> 312 314 <td width="80%"><input type="text" size="70" name="pollq_question" value="<?php echo htmlspecialchars($poll_question_text); ?>" /></td> 313 315 </tr> … … 317 319 <table class="form-table"> 318 320 <thead> 319 <tr >320 <t d width="20%"><strong><?php _e('Answer No.', 'wp-polls') ?></strong></td>321 <t d width="60%"><strong><?php _e('Answer Text', 'wp-polls') ?></strong></td>322 <t d width="20%" align="right"><strong><?php _e('No. Of Votes', 'wp-polls') ?></strong></td>321 <tr> 322 <th width="20%" scope="row" valign="top"><?php _e('Answer No.', 'wp-polls') ?></th> 323 <th width="60%" scope="row" valign="top"><?php _e('Answer Text', 'wp-polls') ?></th> 324 <th width="20%" scope="row" valign="top" style="text-align: right;"><?php _e('No. Of Votes', 'wp-polls') ?></th> 323 325 </tr> 324 326 </thead> … … 336 338 $pollip_answers[$polla_aid] = $polla_answers; 337 339 echo "<tr id=\"poll-answer-$polla_aid\">\n"; 338 echo '<t d width="20%"><strong>'.sprintf(__('Answer %s:', 'wp-polls'), $i).'</strong></td>'."\n";340 echo '<th width="20%" scope="row" valign="top">'.sprintf(__('Answer %s', 'wp-polls'), $i).'</th>'."\n"; 339 341 echo "<td width=\"60%\"><input type=\"text\" size=\"50\" maxlength=\"200\" name=\"polla_aid-$polla_aid\" value=\"".htmlspecialchars($polla_answers)."\" /> "; 340 342 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"; … … 363 365 <table class="form-table"> 364 366 <tr> 365 <t d width="40%" valign="top"><strong><?php _e('Allows Users To Select More Than One Answer?', 'wp-polls'); ?></strong></td>367 <th width="40%" scope="row" valign="top"><?php _e('Allows Users To Select More Than One Answer?', 'wp-polls'); ?></th> 366 368 <td width="60%"> 367 369 <select name="pollq_multiple_yes" id="pollq_multiple_yes" size="1" onchange="check_pollq_multiple();"> … … 372 374 </tr> 373 375 <tr> 374 <t d width="40%" valign="top"><strong><?php _e('Maximum Number Of Selected Answers Allowed?', 'wp-polls') ?></strong></td>376 <th width="40%" scope="row" valign="top"><?php _e('Maximum Number Of Selected Answers Allowed?', 'wp-polls') ?></th> 375 377 <td width="60%"> 376 <select name="pollq_multiple" id="pollq_multiple" size="1" <?php if($poll_multiple == 0) { echo 'disabled=" true"'; } ?>>378 <select name="pollq_multiple" id="pollq_multiple" size="1" <?php if($poll_multiple == 0) { echo 'disabled="disabled"'; } ?>> 377 379 <?php 378 380 for($i = 1; $i <= $poll_noquestion; $i++) { … … 392 394 <table class="form-table"> 393 395 <tr> 394 <t d width="20%" valign="top"><strong><?php _e('Start Date/Time', 'wp-polls'); ?></strong>:</td>396 <th width="20%" scope="row" valign="top"><?php _e('Start Date/Time', 'wp-polls'); ?></th> 395 397 <td width="80%"> 396 398 <?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 /> … …
