Changeset 36832
- Timestamp:
- 03/30/08 10:02:49 (4 months ago)
- Location:
- wp-polls/trunk
- Files:
-
- 7 modified
-
polls-add.php (modified) (2 diffs)
-
polls-logs.php (modified) (1 diff)
-
polls-manager.php (modified) (4 diffs)
-
polls-options.php (modified) (2 diffs)
-
polls-templates.php (modified) (2 diffs)
-
wp-polls.mo (modified) (previous)
-
wp-polls.pot (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-polls/trunk/polls-add.php
r35561 r36832 94 94 $update_latestpoll = update_option('poll_latestpoll', $latest_pollid); 95 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 »</a></p>';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 97 } 98 98 cron_polls_place(); … … 169 169 /* ]]> */ 170 170 </script> 171 <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade">'.stripslashes($text).'</div>'; } ?> 171 172 <form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>" method="post"> 172 173 <div class="wrap"> 173 174 <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 177 175 <!-- Poll Question --> 178 176 <h3><?php _e('Poll Question', 'wp-polls'); ?></h3> -
wp-polls/trunk/polls-logs.php
r35561 r36832 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>'; } ?> 121 122 <div class="wrap"> 122 123 <h2><?php _e('Poll\'s Logs', 'wp-polls'); ?></h2> 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 124 <h3><?php echo $poll_question; ?></h3> 125 125 <p> -
wp-polls/trunk/polls-manager.php
r35561 r36832 298 298 </script> 299 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 300 302 <!-- Edit Poll --> 301 303 <form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>" method="post"> … … 304 306 <div class="wrap"> 305 307 <h2><?php _e('Edit Poll', 'wp-polls'); ?></h2> 306 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>'; } ?>308 309 308 <!-- Poll Question --> 310 309 <h3><?php _e('Poll Question', 'wp-polls'); ?></h3> … … 452 451 $total_voters = 0; 453 452 ?> 453 <!-- Last Action --> 454 <div id="message" class="updated" style="display: none;"></div> 455 454 456 <!-- Manage Polls --> 455 457 <div class="wrap"> 456 <h2><?php _e('Manage Polls', 'wp-polls'); ?></h2> 457 <!-- Last Action --> 458 <div id="message" class="updated" style="display: none; margin-top: 15px;"></div> 458 <h2><?php _e('Manage Polls', 'wp-polls'); ?></h2> 459 459 <br style="clear" /> 460 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'); 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']); 494 478 } 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));479 $multiple_polls = array(); 496 480 } 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) { 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)) { 504 511 $style = 'class="highlight"'; 505 512 } 506 } elseif($current_poll == 0) { 507 if($poll_id == $latest_poll) { 508 $style = 'class="highlight"'; 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> '; 509 526 } 510 } else if(in_array($poll_id, $multiple_polls)) { 511 $style = 'class="highlight"'; 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&mode=logs&id=$poll_id\" class=\"edit\">".__('Logs', 'wp-polls')."</a></td>\n"; 541 echo "<td><a href=\"$base_page&mode=edit&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 512 548 } 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&mode=logs&id=$poll_id\" class=\"edit\">".__('Logs', 'wp-polls')."</a></td>\n"; 541 echo "<td><a href=\"$base_page&mode=edit&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 549 } else { 550 echo '<tr><td colspan="9" align="center"><strong>'.__('No Polls Found', 'wp-polls').'</strong></td></tr>'; 548 551 } 549 } else { 550 echo '<tr><td colspan="9" align="center"><strong>'.__('No Polls Found', 'wp-polls').'</strong></td></tr>'; 551 } 552 ?> 553 </tbody> 552 ?> 553 </tbody> 554 554 </table> 555 555 </div> … … 558 558 <!-- Polls Stats --> 559 559 <div class="wrap"> 560 <h2><?php _e('Polls Stats', 'wp-polls'); ?></h2>560 <h2><?php _e('Polls Stats', 'wp-polls'); ?></h2> 561 561 <br style="clear" /> 562 562 <table class="widefat"> -
wp-polls/trunk/polls-options.php
r36798 r36832 129 129 /* ]]> */ 130 130 </script> 131 <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?> 131 132 <form id="poll_options_form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>"> 132 133 <div class="wrap"> 133 134 <h2><?php _e('Poll Options', 'wp-polls'); ?></h2> 134 135 <?php if(!empty($text)) { echo '<!-- Last Action --><br class="clear" /><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>136 137 135 <!-- Poll Bar Style --> 138 136 <h3><?php _e('Poll Bar Style', 'wp-polls'); ?></h3> … … 392 390 <!-- Submit Button --> 393 391 <p class="submit"> 394 <input type="submit" name="Submit" class="button" value="<?php _e(' Update Options »', 'wp-polls'); ?>" />392 <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-polls'); ?>" /> 395 393 </p> 396 394 </div> -
wp-polls/trunk/polls-templates.php
r35579 r36832 139 139 /* ]]> */ 140 140 </script> 141 <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?> 141 142 <form id="poll_options_form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>"> 142 143 <div class="wrap"> 143 <h2><?php _e('Poll Templates', 'wp-polls'); ?></h2> 144 145 <?php if(!empty($text)) { echo '<!-- Last Action --><br class="clear" /><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?> 146 144 <h2><?php _e('Poll Templates', 'wp-polls'); ?></h2> 147 145 <!-- Template Variables --> 148 146 <h3><?php _e('Template Variables', 'wp-polls'); ?></h3> … … 462 460 </table> 463 461 <p class="submit"> 464 <input type="submit" name="Submit" class="button" value="<?php _e(' Update Templates »', 'wp-polls'); ?>" />462 <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-polls'); ?>" /> 465 463 </p> 466 464 </div> -
wp-polls/trunk/wp-polls.pot
r36798 r36832 3 3 "Project-Id-Version: WP-Polls 2.30\n" 4 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: 2008-03-30 1 6:37+0800\n"5 "PO-Revision-Date: 2008-03-30 17:58+0800\n" 6 6 "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 7 7 "Language-Team: Lester Chan <lesterchan@gmail.com>\n" … … 16 16 17 17 #: polls-add.php:36 18 #: polls-add.php:17 319 #: polls-add.php:24 318 #: polls-add.php:174 19 #: polls-add.php:241 20 20 #: wp-polls.php:59 21 21 msgid "Add Poll" … … 36 36 #, php-format 37 37 msgid "Poll '%s' Added Successfully." 38 msgstr "" 39 40 #: polls-add.php:96 41 #: polls-manager.php:458 42 #: wp-polls.php:58 43 msgid "Manage Polls" 38 44 msgstr "" 39 45 … … 49 55 msgstr "" 50 56 51 #: polls-add.php:17 852 #: polls-manager.php:3 1057 #: polls-add.php:176 58 #: polls-manager.php:309 53 59 msgid "Poll Question" 54 60 msgstr "" 55 61 56 #: polls-add.php:1 8157 #: polls-manager.php:31 362 #: polls-add.php:179 63 #: polls-manager.php:312 58 64 #: polls-manager.php:464 59 65 msgid "Question" 60 66 msgstr "" 61 67 62 #: polls-add.php:18 663 #: polls-manager.php:31 868 #: polls-add.php:184 69 #: polls-manager.php:317 64 70 msgid "Poll Answers" 65 71 msgstr "" 66 72 67 #: polls-add.php:1 9168 #: polls-manager.php:35 373 #: polls-add.php:189 74 #: polls-manager.php:352 69 75 msgid "Add Answer" 70 76 msgstr "" 71 77 72 #: polls-add.php:1 9173 #: polls-manager.php:35 378 #: polls-add.php:189 79 #: polls-manager.php:352 74 80 msgid "Remove Answer" 75 81 msgstr "" 76 82 77 #: polls-add.php:19 878 #: polls-manager.php:3 4083 #: polls-add.php:196 84 #: polls-manager.php:339 79 85 #, php-format 80 86 msgid "Answer %s" 81 87 msgstr "" 82 88 83 #: polls-add.php:20 784 #: polls-manager.php:36 489 #: polls-add.php:205 90 #: polls-manager.php:363 85 91 msgid "Poll Multiple Answers" 86 92 msgstr "" 87 93 88 #: polls-add.php:2 1089 #: polls-manager.php:36 794 #: polls-add.php:208 95 #: polls-manager.php:366 90 96 msgid "Allows Users To Select More Than One Answer?" 91 97 msgstr "" 92 98 93 #: polls-add.php:21 394 #: polls-manager.php:3 7095 #: polls-options.php:20 696 #: polls-options.php:21 597 #: polls-options.php:33 299 #: polls-add.php:211 100 #: polls-manager.php:369 101 #: polls-options.php:204 102 #: polls-options.php:213 103 #: polls-options.php:330 98 104 #: wp-polls-widget.php:105 99 105 msgid "No" 100 106 msgstr "" 101 107 102 #: polls-add.php:21 4108 #: polls-add.php:212 103 109 #: polls-logs.php:372 104 #: polls-manager.php:37 1110 #: polls-manager.php:370 105 111 #: polls-manager.php:593 106 #: polls-options.php:20 7107 #: polls-options.php:21 6108 #: polls-options.php:33 3112 #: polls-options.php:205 113 #: polls-options.php:214 114 #: polls-options.php:331 109 115 #: polls-uninstall.php:132 110 116 #: wp-polls-widget.php:110 … … 112 118 msgstr "" 113 119 114 #: polls-add.php:21 9115 #: polls-manager.php:37 6120 #: polls-add.php:217 121 #: polls-manager.php:375 116 122 msgid "Maximum Number Of Selected Answers Allowed?" 117 123 msgstr "" 118 124 119 #: polls-add.php:23 2120 #: polls-manager.php:39 3125 #: polls-add.php:230 126 #: polls-manager.php:392 121 127 msgid "Poll Start/End Date" 122 128 msgstr "" 123 129 124 #: polls-add.php:23 5125 #: polls-manager.php:39 6130 #: polls-add.php:233 131 #: polls-manager.php:395 126 132 #: polls-manager.php:466 127 133 msgid "Start Date/Time" 128 134 msgstr "" 129 135 130 #: polls-add.php:23 9131 #: polls-manager.php:40 4136 #: polls-add.php:237 137 #: polls-manager.php:403 132 138 #: polls-manager.php:467 133 139 msgid "End Date/Time" 134 140 msgstr "" 135 141 136 #: polls-add.php:2 40137 #: polls-manager.php:41 5142 #: polls-add.php:238 143 #: polls-manager.php:414 138 144 msgid "Do NOT Expire This Poll" 139 145 msgstr "" 140 146 141 #: polls-add.php:24 3142 #: polls-manager.php:44 1147 #: polls-add.php:241 148 #: polls-manager.php:440 143 149 msgid "Cancel" 144 150 msgstr "" … … 190 196 191 197 #: polls-admin-ajax.php:78 192 #: polls-manager.php:4 40198 #: polls-manager.php:439 193 199 #: wp-polls.php:219 194 200 msgid "Open Poll" … … 206 212 207 213 #: polls-admin-ajax.php:89 208 #: polls-manager.php:43 9214 #: polls-manager.php:438 209 215 #: wp-polls.php:220 210 216 msgid "Close Poll" … … 246 252 msgstr "" 247 253 248 #: polls-logs.php:12 2254 #: polls-logs.php:123 249 255 msgid "Poll's Logs" 250 256 msgstr "" … … 372 378 #: polls-logs.php:290 373 379 #: polls-logs.php:318 374 #: polls-manager.php:39 8375 #: polls-manager.php:4 10380 #: polls-manager.php:397 381 #: polls-manager.php:409 376 382 #: polls-manager.php:487 377 383 #: polls-manager.php:495 … … 431 437 432 438 #: polls-manager.php:39 433 #: polls-manager.php:30 5434 #: polls-manager.php:42 9439 #: polls-manager.php:307 440 #: polls-manager.php:428 435 441 msgid "Edit Poll" 436 442 msgstr "" … … 470 476 msgstr "" 471 477 478 #: polls-manager.php:321 479 msgid "Answer No."
