Changeset 26538

Show
Ignore:
Timestamp:
12/14/07 16:10:52 (7 months ago)
Author:
GamerZ
Message:

Updates

Location:
wp-polls/trunk
Files:
4 added
2 removed
5 modified

Legend:

Unmodified
Added
Removed
  • wp-polls/trunk/polls-manager.php

    r22648 r26538  
    342342                                                echo '<td width="20%"><strong>'.sprintf(__('Answer %s:', 'wp-polls'), $i).'</strong></td>'."\n"; 
    343343                                                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"; 
     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')), js_escape(htmlspecialchars($polla_answers)))."');\" class=\"button\" /></td>\n"; 
    345345                                                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"; 
    346346                                                $poll_actual_totalvotes += $polla_votes; 
     
    542542                                          echo "<td><a href=\"$base_page&amp;mode=logs&amp;id=$poll_id\" class=\"edit\">".__('Logs', 'wp-polls')."</a></td>\n"; 
    543543                                          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"; 
     544                                          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"; 
    545545                                          echo '</tr>'; 
    546546                                          $i++; 
  • wp-polls/trunk/readme.html

    r25647 r26538  
    291291                                    <li>NEW: Uses wp-polls-widget.php Instead Of polls-widget.php</li> 
    292292                                    <li>NEW: Use number_format_i18n() Instead</li> 
     293                                    <li>NEW: Renamed polls-admin-js.php To polls-admin-js.js and Move The Dynamic Javascript Variables To The PHP Pages</li> 
     294                                    <li>NEW: Renamed polls-js.php To polls-js.js and Move The Dynamic Javascript Variables To The PHP Pages</li> 
     295                                    <li>NEW: Uses polls-js-packed.js And polls-admin-js-packed.js</li> 
     296                                    <li>FIXED: Unable To Delete Poll Or Poll Answers If There Is Quotes Within The Poll Or Poll Answer</li> 
    293297                                    <li>FIXED: number_format() Not Used In Polls Archive</li> 
    294298                                    <li>FIXED: Unable To Schedule Future Poll If The Year Is Different From Current Year</li> 
  • wp-polls/trunk/wp-polls.php

    r25647 r26538  
    153153add_action('wp_head', 'poll_header'); 
    154154function poll_header() {       
     155      $poll_ajax_style = get_option('poll_ajax_style'); 
     156      $pollbar = get_option('poll_bar'); 
     157      wp_register_script('wp-polls', '/wp-content/plugins/wp-polls/polls-js-packed.js', false, '2.30'); 
    155158      echo "\n".'<!-- Start Of Script Generated By WP-Polls 2.30 -->'."\n"; 
    156       wp_register_script('wp-polls', '/wp-content/plugins/wp-polls/polls-js.php', false, '2.30'); 
     159      echo '<script type="text/javascript">'."\n"; 
     160      echo '/* <![CDATA[ */'."\n"; 
     161      echo "\t".'var polls_ajax_url = \''.get_option('siteurl').'/wp-content/plugins/wp-polls/wp-polls.php'."';\n"; 
     162      echo "\t".'var polls_text_wait = \''. __('Your last request is still being processed. Please wait a while ...', 'wp-polls').'\';'."\n"; 
     163      echo "\t".'var polls_text_valid = \''.__('Please choose a valid poll answer.', 'wp-polls').'\';'."\n"; 
     164      echo "\t".'var polls_text_multiple = \''.__('Maximum number of choices allowed:', 'wp-polls').'\';'."\n"; 
     165      echo "\t".'var poll_show_loading = \''.intval($poll_ajax_style['loading']).'\';'."\n"; 
     166      echo "\t".'var poll_show_fading = \''.intval($poll_ajax_style['fading']).'\';'."\n"; 
     167      echo '/* ]]> */'."\n"; 
     168      echo '</script>'."\n"; 
    157169      wp_print_scripts(array('sack', 'wp-polls')); 
    158170      echo '<link rel="stylesheet" href="'.get_option('siteurl').'/wp-content/plugins/wp-polls/polls-css.css" type="text/css" media="screen" />'."\n"; 
    159       echo '<style type="text/css">'."\n"; 
    160       $pollbar = get_option('poll_bar'); 
     171      echo '<style type="text/css">'."\n";       
    161172      if($pollbar['style'] == 'use_css') { 
    162173            echo '.wp-polls .pollbar {'."\n"; 
     
    186197add_action('admin_head', 'poll_header_admin'); 
    187198function poll_header_admin() { 
    188       wp_register_script('wp-polls-admin', '/wp-content/plugins/wp-polls/polls-admin-js.php', false, '2.30'); 
     199      wp_register_script('wp-polls-admin', '/wp-content/plugins/wp-polls/polls-admin-js-packed.js', false, '2.30'); 
     200      echo "\n".'<!-- Start Of Script Generated By WP-Polls 2.30 -->'."\n"; 
     201      echo '<script type="text/javascript">'."\n"; 
     202      echo '/* <![CDATA[ */'."\n"; 
     203      echo "\t".'var polls_admin_ajax_url = \''.get_option('siteurl').'/wp-content/plugins/wp-polls/polls-admin-ajax.php'."';\n"; 
     204      echo "\t".'var polls_admin_text_delete_poll = \''.__('Delete Poll', 'wp-polls').'\';'."\n"; 
     205      echo "\t".'var polls_admin_text_no_poll_logs = \''.__('No poll logs available.', 'wp-polls').'\';'."\n"; 
     206      echo "\t".'var polls_admin_text_delete_all_logs = \''.__('Delete All Logs', 'wp-polls').'\';'."\n"; 
     207      echo "\t".'var polls_admin_text_checkbox_delete_all_logs = \''.__('Please check the \\\'Yes\\\' checkbox if you want to delete all logs.', 'wp-polls').'\';'."\n"; 
     208      echo "\t".'var polls_admin_text_delete_poll_logs = \''.__('Delete Logs For This Poll Only', 'wp-polls').'\';'."\n"; 
     209      echo "\t".'var polls_admin_text_checkbox_delete_poll_logs = \''.__('Please check the \\\'Yes\\\' checkbox if you want to delete all logs for this poll ONLY.', 'wp-polls').'\';'."\n"; 
     210      echo "\t".'var polls_admin_text_delete_poll_ans = \''.__('Delete Poll Answer', 'wp-polls').'\';'."\n"; 
     211      echo "\t".'var polls_admin_text_open_poll = \''.__('Open Poll', 'wp-polls').'\';'."\n"; 
     212      echo "\t".'var polls_admin_text_close_poll = \''.__('Close Poll', 'wp-polls').'\';'."\n"; 
     213      echo "\t".'var polls_admin_text_enter_poll_id = \''.__('Enter Poll ID', 'wp-polls').'\';'."\n"; 
     214      echo "\t".'var polls_admin_text_enter_poll_id_again = \''.__('Error: Poll ID must be numeric', 'wp-polls').'\n\n'.__('Please enter Poll ID again', 'wp-polls').'\';'."\n"; 
     215      echo '/* ]]> */'."\n"; 
     216      echo '</script>'."\n"; 
    189217      wp_print_scripts(array('sack', 'wp-polls-admin')); 
    190218      echo '<link rel="stylesheet" href="'.get_option('siteurl').'/wp-content/plugins/wp-polls/polls-css.css" type="text/css" media="screen" />'."\n"; 
     219      echo '<!-- End Of Script Generated By WP-Polls 2.30 -->'."\n"; 
    191220} 
    192221 
  • wp-polls/trunk/wp-polls.pot

    r25647 r26538  
    33"Project-Id-Version: WP-Polls 2.30\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2007-11-29 22:50+0800\n" 
     5"PO-Revision-Date: 2007-12-15 00:06+0800\n" 
    66"Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 
    77"Language-Team: Lester Chan <gamerz84@hotmail.com>\n" 
     
    139139 
    140140#: polls-admin-ajax.php:38 
    141 #: polls-admin-js.php:78 
    142141#: polls-manager.php:590 
     142#: wp-polls.php:206 
    143143msgid "Delete All Logs" 
    144144msgstr "" 
     
    153153 
    154154#: polls-admin-ajax.php:49 
    155 #: polls-admin-js.php:106 
    156155#: polls-logs.php:382 
     156#: wp-polls.php:208 
    157157msgid "Delete Logs For This Poll Only" 
    158158msgstr "" 
     
    169169 
    170170#: polls-admin-ajax.php:62 
    171 #: polls-admin-js.php:148 
     171#: wp-polls.php:210 
    172172msgid "Delete Poll Answer" 
    173173msgstr "" 
     
    184184 
    185185#: polls-admin-ajax.php:78 
    186 #: polls-admin-js.php:172 
    187186#: polls-manager.php:442 
     187#: wp-polls.php:211 
    188188msgid "Open Poll" 
    189189msgstr "" 
     
    200200 
    201201#: polls-admin-ajax.php:89 
    202 #: polls-admin-js.php:195 
    203202#: polls-manager.php:441 
     203#: wp-polls.php:212 
    204204msgid "Close Poll" 
    205205msgstr "" 
     
    216216 
    217217#: polls-admin-ajax.php:100 
    218 #: polls-admin-js.php:56 
     218#: wp-polls.php:204 
    219219msgid "Delete Poll" 
    220220msgstr "" 
     
    228228#, php-format 
    229229msgid "Poll '%s' Deleted Successfully" 
    230 msgstr "" 
    231  
    232 #: polls-admin-js.php:69 
    233 #: polls-manager.php:593 
    234 msgid "No poll logs available." 
    235 msgstr "" 
    236  
    237 #: polls-admin-js.php:85 
    238 msgid "Please check the 'Yes' checkbox if you want to delete all logs." 
    239 msgstr "" 
    240  
    241 #: polls-admin-js.php:94 
    242 #: polls-logs.php:371 
    243 #: polls-logs.php:385 
    244 msgid "No poll logs available for this poll." 
    245 msgstr "" 
    246  
    247 #: polls-admin-js.php:114 
    248 msgid "Please check the 'Yes' checkbox if you want to delete all logs for this poll ONLY." 
    249 msgstr "" 
    250  
    251 #: polls-admin-js.php:206 
    252 msgid "Enter Poll ID" 
    253 msgstr "" 
    254  
    255 #: polls-admin-js.php:208 
    256 msgid "Error: Poll ID must be numeric" 
    257 msgstr "" 
    258  
    259 #: polls-admin-js.php:208 
    260 msgid "Please enter Poll ID again" 
    261 msgstr "" 
    262  
    263 #: polls-js.php:36 
    264 msgid "Your last request is still being processed. Please wait a while ..." 
    265 msgstr "" 
    266  
    267 #: polls-js.php:37 
    268 msgid "Please choose a valid poll answer." 
    269 msgstr "" 
    270  
    271 #: polls-js.php:38 
    272 msgid "Maximum number of choices allowed:" 
    273230msgstr "" 
    274231 
     
    413370#: polls-manager.php:489 
    414371#: polls-manager.php:497 
    415 #: wp-polls.php:350 
    416 #: wp-polls.php:355 
    417 #: wp-polls.php:466 
    418 #: wp-polls.php:471 
    419 #: wp-polls.php:846 
    420 #: wp-polls.php:850 
     372#: wp-polls.php:379 
     373#: wp-polls.php:384 
     374#: wp-polls.php:495 
     375#: wp-polls.php:500 
     376#: wp-polls.php:875 
     377#: wp-polls.php:879 
    421378#, php-format 
    422379msgid "%s @ %s" 
     
    443400#: polls-logs.php:369 
    444401msgid "No poll logs matches the filter." 
     402msgstr "" 
     403 
     404#: polls-logs.php:371 
     405#: polls-logs.php:385 
     406msgid "No poll logs available for this poll." 
    445407msgstr "" 
    446408 
     
    582544#: polls-templates.php:116 
    583545#: polls-templates.php:119 
    584 #: wp-polls.php:1314 
    585 #: wp-polls.php:1317 
     546#: wp-polls.php:1343 
     547#: wp-polls.php:1346 
    586548msgid "Total Voters" 
    587549msgstr "" 
     
    596558 
    597559#: polls-manager.php:495 
    598 #: wp-polls.php:353 
    599 #: wp-polls.php:469 
    600 #: wp-polls.php:848 
     560#: wp-polls.php:382 
     561#: wp-polls.php:498 
     562#: wp-polls.php:877 
    601563msgid "No Expiry" 
    602564msgstr "" 
     
    666628msgstr "" 
    667629 
     630#: polls-manager.php:593 
     631#: wp-polls.php:205 
     632msgid "No poll logs available." 
     633msgstr "" 
     634 
    668635#: polls-manager.php:597 
    669636msgid "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." 
     
    829796#: polls-templates.php:110 
    830797#: polls-templates.php:113 
    831 #: wp-polls.php:1311 
    832 #: wp-polls.php:1312 
     798#: wp-polls.php:1340 
     799#: wp-polls.php:1341 
    833800msgid "Votes" 
    834801msgstr "" 
     
    1014981#: polls-templates.php:104 
    1015982#: polls-templates.php:119 
    1016 #: wp-polls.php:1305 
    1017 #: wp-polls.php:1318 
     983#: wp-polls.php:1334 
     984#: wp-polls.php:1347 
    1018985msgid "Vote" 
    1019986msgstr "" 
    1020987 
    1021988#: polls-templates.php:104 
    1022 #: wp-polls.php:1306 
     989#: wp-polls.php:1335 
    1023990msgid "View Results Of This Poll" 
    1024991msgstr "" 
    1025992 
    1026993#: polls-templates.php:104 
    1027 #: wp-polls.php:1306 
     994#: wp-polls.php:1335 
    1028995msgid "View Results" 
    1029996msgstr "" 
    1030997 
    1031998#: polls-templates.php:113 
    1032 #: wp-polls.php:1312 
     999#: wp-polls.php:1341 
    10331000msgid "You Have Voted For This Choice" 
    10341001msgstr "" 
    10351002 
    10361003#: polls-templates.php:119 
    1037 #: wp-polls.php:1318 
     1004#: wp-polls.php:1347 
    10381005msgid "Vote For This Poll" 
    10391006msgstr "" 
     
    10411008#: polls-templates.php:122 
    10421009#: polls-usage.php:80 
    1043 #: wp-polls.php:1345 
     1010#: wp-polls.php:1374 
    10441011msgid "Polls Archive" 
    10451012msgstr "" 
     
    10541021 
    10551022#: polls-templates.php:131 
    1056 #: wp-polls.php:1320 
     1023#: wp-polls.php:1349 
    10571024msgid "Sorry, there are no polls available at the moment." 
    10581025msgstr "" 
    10591026 
    10601027#: polls-templates.php:134 
    1061 #: wp-polls.php:1321 
     1028#: wp-polls.php:1350 
    10621029msgid "An error has occurred when processing your poll." 
    10631030msgstr "" 
     
    15131480msgstr "" 
    15141481 
    1515 #: wp-polls.php:201 
     1482#: wp-polls.php:162 
     1483msgid "Your last request is still being processed. Please wait a while ..." 
     1484msgstr "" 
     1485 
     1486#: wp-polls.php:163 
     1487msgid "Please choose a valid poll answer." 
     1488msgstr "" 
     1489 
     1490#: wp-polls.php:164 
     1491msgid "Maximum number of choices allowed:" 
     1492msgstr "" 
     1493 
    15161494#: wp-polls.php:207 
     1495msgid "Please check the \\'Yes\\' checkbox if you want to delete all logs." 
     1496msgstr "" 
     1497 
     1498#: wp-polls.php:209 
     1499msgid "Please check the \\'Yes\\' checkbox if you want to delete all logs for this poll ONLY." 
     1500msgstr "" 
     1501 
     1502#: wp-polls.php:213 
     1503msgid "Enter Poll ID" 
     1504msgstr "" 
     1505 
     1506#: wp-polls.php:214 
     1507msgid "Error: Poll ID must be numeric" 
     1508msgstr "" 
     1509 
     1510#: wp-polls.php:214 
     1511msgid "Please enter Poll ID again" 
     1512msgstr "" 
     1513 
     1514#: wp-polls.php:230 
     1515#: wp-polls.php:236 
    15171516msgid "Poll" 
    15181517msgstr "" 
    15191518 
    1520 #: wp-polls.php:208 
     1519#: wp-polls.php:237 
    15211520msgid "Insert Poll" 
    15221521msgstr "" 
    15231522 
    1524 #: wp-polls.php:431 
    1525 #: wp-polls.php:591 
     1523#: wp-polls.php:460 
     1524#: wp-polls.php:620 
    15261525msgid "Loading" 
    15271526msgstr "" 
    15281527 
    1529 #: wp-polls.php:634 
     1528#: wp-polls.php:663 
    15301529msgid "Note: There is a poll embedded within this post, please visit the site to participate in this post's poll." 
    15311530msgstr "" 
    15321531 
    1533 #: wp-polls.php:975 
     1532#: wp-polls.php:1004 
    15341533msgid "Previous Page" 
    15351534msgstr "" 
    15361535 
    1537 #: wp-polls.php:983 
     1536#: wp-polls.php:1012 
    15381537msgid "Next Page" 
    15391538msgstr "" 
    15401539 
    1541 #: wp-polls.php:992 
     1540#: wp-polls.php:1021 
    15421541msgid "Pages" 
    15431542msgstr "" 
    15441543 
    1545 #: wp-polls.php:994 
     1544#: wp-polls.php:1023 
    15461545msgid "Go to First Page" 
    15471546msgstr "" 
    15481547 
    1549 #: wp-polls.php:994 
     1548#: wp-polls.php:1023 
    15501549msgid "First" 
    15511550msgstr "" 
    15521551 
    1553 #: wp-polls.php:997 
    1554 #: wp-polls.php:1009 
     1552#: wp-polls.php:1026 
     1553#: wp-polls.php:1038 
    15551554msgid "Go to Page" 
    15561555msgstr "" 
    15571556 
    1558 #: wp-polls.php:1004 
     1557#: wp-polls.php:1033 
    15591558msgid "Page" 
    15601559msgstr "" 
    15611560 
    1562 #: wp-polls.php:1012 
     1561#: wp-polls.php:1041 
    15631562msgid "Go to Last Page" 
    15641563msgstr "" 
    15651564 
    1566 #: wp-polls.php:1012 
     1565#: wp-polls.php:1041 
    15671566msgid "Last" 
    15681567msgstr "" 
    15691568 
    1570 #: wp-polls.php:1185 
     1569#: wp-polls.php:1214 
    15711570#, php-format 
    15721571msgid "Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s" 
    15731572msgstr "" 
    15741573 
    1575 #: wp-polls.php:1189 
     1574#: wp-polls.php:1218 
    15761575#, php-format 
    15771576msgid "You Had Already Voted For This Poll. Poll ID #%s" 
    15781577msgstr "" 
    15791578 
    1580 #: wp-polls.php:1193 
     1579#: wp-polls.php:1222 
    15811580#, php-format 
    15821581msgid "Invalid Poll ID. Poll ID #%s" 
    15831582msgstr "" 
    15841583 
    1585 #: wp-polls.php:1219 
    1586 #: wp-polls.php:1221 
    1587 #: wp-polls.php:1231 
     1584#: wp-polls.php:1248 
     1585#: wp-polls.php:1250 
     1586#: wp-polls.php:1260 
    15881587msgid "WP-Polls" 
    15891588msgstr "" 
    15901589 
    1591 #: wp-polls.php:1233 
     1590#: wp-polls.php:1262 
    15921591msgid "polls were created." 
    15931592msgstr "" 
    15941593 
    1595 #: wp-polls.php:1234 
     1594#: wp-polls.php:1263 
    15961595msgid "polls' answers were given." 
    15971596msgstr "" 
    15981597 
    1599 #: wp-polls.php:1235 
     1598#: wp-polls.php:1264 
    16001599msgid "votes were casted." 
    16011600msgstr "" 
    16021601 
    1603 #: wp-polls.php:1289 
     1602#: wp-polls.php:1318 
    16041603msgid "How Is My Site?" 
    16051604msgstr "" 
    16061605 
    1607 #: wp-polls.php:1292 
     1606#: wp-polls.php:1321 
    16081607msgid "Good" 
    16091608msgstr "" 
    16101609 
    1611 #: wp-polls.php:1293 
     1610#: wp-polls.php:1322 
    16121611msgid "Excellent" 
    16131612msgstr "" 
    16141613 
    1615 #: wp-polls.php:1294 
     1614#: wp-polls.php:1323 
    16161615msgid "Bad" 
    16171616msgstr "" 
    16181617 
    1619 #: wp-polls.php:1295 
     1618#: wp-polls.php:1324 
    16201619msgid "Can Be Improved" 
    16211620msgstr "" 
    16221621 
    1623 #: wp-polls.php:1296 
     1622#: wp-polls.php:1325 
    16241623msgid "No Comments" 
    16251624msgstr ""