Changeset 10838
- Timestamp:
- 04/11/07 16:49:42 (1 year ago)
- Files:
-
- wp-polls/trunk/polls/polls-add.php (modified) (3 diffs)
- wp-polls/trunk/polls/polls-css.css (modified) (2 diffs)
- wp-polls/trunk/polls/polls-js.php (modified) (1 diff)
- wp-polls/trunk/polls/polls-manager.php (modified) (6 diffs)
- wp-polls/trunk/polls/polls-options.php (modified) (8 diffs)
- wp-polls/trunk/polls/polls-templates.php (added)
- wp-polls/trunk/polls/polls-usage.php (modified) (1 diff)
- wp-polls/trunk/polls/polls-widget.php (modified) (7 diffs)
- wp-polls/trunk/polls/polls.php (modified) (8 diffs)
- wp-polls/trunk/polls/wp-polls.pot (modified) (14 diffs)
- wp-polls/trunk/readme.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wp-polls/trunk/polls/polls-add.php
r7886 r10838 183 183 <h3><?php _e('Poll Answers', 'wp-polls'); ?></h3> 184 184 <table width="100%" border="0" cellspacing="3" cellpadding="3"> 185 <tfoot> 186 <tr> 187 <td width="20%"> </td> 188 <td width="80%"><input type="button" value="<?php _e('Add Answer', 'wp-polls') ?>" onclick="create_poll_answer();" class="button" /> <input type="button" value="<?php _e('Remove Answer', 'wp-polls') ?>" onclick="remove_poll_answer();" class="button" /></td> 189 </tr> 190 </tfoot> 185 191 <tbody id="poll_answers"> 186 192 <?php … … 199 205 ?> 200 206 </tbody> 201 <tfoot>202 <tr>203 <td width="20%"> </td>204 <td width="80%"><input type="button" value="<?php _e('Add Answer', 'wp-polls') ?>" onclick="create_poll_answer();" class="button" /> <input type="button" value="<?php _e('Remove Answer', 'wp-polls') ?>" onclick="remove_poll_answer();" class="button" /></td>205 </tr>206 </tfoot>207 207 </table> 208 208 <!-- Poll Multiple Answers --> … … 216 216 <option value="1"><?php _e('Yes', 'wp-polls'); ?></option> 217 217 </select> 218 </td> 218 219 </tr> 219 220 <tr> 220 221 <td width="40%" valign="top"><strong><?php _e('Maximum Number Of Selected Answers Allowed?', 'wp-polls') ?></strong></td> 221 222 <td width="60%"> 222 <select name="pollq_multiple" id="pollq_multiple" size="1" disabled=" true">223 <select name="pollq_multiple" id="pollq_multiple" size="1" disabled="disabled"> 223 224 <?php 224 225 for($i = 1; $i <= $poll_noquestion; $i++) { wp-polls/trunk/polls/polls-css.css
r8383 r10838 17 17 18 18 19 .wp-polls ul li, .wp-polls-ul li, .wp-polls-ans ul li { 19 .wp-polls { 20 /* background-color: #ffffff; */ 21 } 22 .wp-polls ul li, wp-polls-ul li, .wp-polls-ans ul li { 20 23 text-align: left; 21 24 background-image: none; … … 26 29 list-style: none; 27 30 } 28 .wp-polls ul li:before, .wp-polls-ul li, .wp-polls-ans ul li:before, #sidebar ul ul li:before {31 .wp-polls ul li:before, wp-polls-ul li, .wp-polls-ans ul li:before, #sidebar ul ul li:before { 29 32 content: ''; 30 33 } wp-polls/trunk/polls/polls-js.php
r7886 r10838 57 57 poll_answer = eval("poll_form.poll_" + poll_id); 58 58 poll_answer_id = ""; 59 if(document.getElementById('poll_multiple_ans ')) {60 poll_multiple_ans = parseInt(document.getElementById('poll_multiple_ans ').value);59 if(document.getElementById('poll_multiple_ans_' + poll_id)) { 60 poll_multiple_ans = parseInt(document.getElementById('poll_multiple_ans_' + poll_id).value); 61 61 } else { 62 62 poll_multiple_ans = 0; wp-polls/trunk/polls/polls-manager.php
r7967 r10838 314 314 </tr> 315 315 </thead> 316 <tfoot> 317 <tr> 318 <td width="20%"> </td> 319 <td width="60%"><input type="button" value="<?php _e('Add Answer', 'wp-polls') ?>" onclick="create_poll_answer();" class="button" /> <input type="button" value="<?php _e('Remove Answer', 'wp-polls') ?>" onclick="remove_poll_answer();" class="button" /></td> 320 <td width="20%" align="right"><strong><?php _e('Total Votes:', 'wp-polls'); ?></strong><strong id="poll_total_votes"><?php echo $poll_actual_totalvotes; ?></strong> <input type="text" size="4" readonly="readonly" id="pollq_totalvotes" name="pollq_totalvotes" value="<?php echo $poll_actual_totalvotes; ?>" onblur="check_totalvotes();" /></td> 321 </tr> 322 <tr> 323 <td width="20%"> </td> 324 <td width="60%"> </td> 325 <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> 326 </tr> 327 </tfoot> 316 328 <tbody id="poll_answers"> 317 329 <?php … … 342 354 ?> 343 355 </tbody> 344 <tfoot>345 <tr>346 <td width="20%"> </td>347 <td width="60%"><input type="button" value="<?php _e('Add Answer', 'wp-polls') ?>" onclick="create_poll_answer();" class="button" /> <input type="button" value="<?php _e('Remove Answer', 'wp-polls') ?>" onclick="remove_poll_answer();" class="button" /></td>348 <td width="20%" align="right"><strong><?php _e('Total Votes:', 'wp-polls'); ?></strong><strong id="poll_total_votes"><?php echo $poll_actual_totalvotes; ?></strong> <input type="text" size="4" readonly="true" id="pollq_totalvotes" name="pollq_totalvotes" value="<?php echo $poll_actual_totalvotes; ?>" onblur="check_totalvotes();" /></td>349 </tr>350 <tr>351 <td width="20%"> </td>352 <td width="60%"> </td>353 <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>354 </tr>355 </tfoot>356 356 </table> 357 357 <!-- Poll Multiple Answers --> … … 365 365 <option value="1"<?php if($poll_multiple > 0) { echo ' selected="selected"'; } ?>><?php _e('Yes', 'wp-polls'); ?></option> 366 366 </select> 367 </td> 367 368 </tr> 368 369 <tr> … … 521 522 <h2><?php _e('Manage Polls', 'wp-polls'); ?></h2> 522 523 <table width="100%" border="0" cellspacing="3" cellpadding="3"> 523 <tr class="thead"> 524 <th><?php _e('ID', 'wp-polls'); ?></th> 525 <th><?php _e('Question', 'wp-polls'); ?></th> 526 <th><?php _e('Total Voters', 'wp-polls'); ?></th> 527 <th><?php _e('Start Date/Time', 'wp-polls'); ?></th> 528 <th><?php _e('End Date/Time', 'wp-polls'); ?></th> 529 <th><?php _e('Status', 'wp-polls'); ?></th> 530 <th colspan="2"><?php _e('Action', 'wp-polls'); ?></th> 531 </tr> 524 <thead> 525 <tr class="thead"> 526 <th><?php _e('ID', 'wp-polls'); ?></th> 527 <th><?php _e('Question', 'wp-polls'); ?></th> 528 <th><?php _e('Total Voters', 'wp-polls'); ?></th> 529 <th><?php _e('Start Date/Time', 'wp-polls'); ?></th> 530 <th><?php _e('End Date/Time', 'wp-polls'); ?></th> 531 <th><?php _e('Status', 'wp-polls'); ?></th> 532 <th colspan="2"><?php _e('Action', 'wp-polls'); ?></th> 533 </tr> 534 </thead> 532 535 <tbody id="manage_polls"> 533 536 <?php 534 537 if($polls) { 538 if(function_exists('dynamic_sidebar')) { 539 $options = get_option('widget_polls'); 540 $multiple_polls = explode(',', $options['multiple_polls']); 541 } else { 542 $multiple_polls = array(); 543 } 535 544 $i = 0; 536 545 $current_poll = intval(get_option('poll_currentpoll')); … … 562 571 $style = 'style=\'background-color: #b8d4ff;\''; 563 572 } 573 } else if(in_array($poll_id, $multiple_polls)) { 574 $style = 'style=\'background-color: #b8d4ff;\''; 564 575 } 565 576 echo "<tr id=\"poll-$poll_id\" $style>\n"; … … 574 585 echo '<strong>'.__('Displayed:', 'wp-polls').'</strong> '; 575 586 } 587 } else if(in_array($poll_id, $multiple_polls)) { 588 echo '<strong>'.__('Displayed:', 'wp-polls').'</strong> '; 576 589 } 577 590 echo "$poll_question</td>\n"; wp-polls/trunk/polls/polls-options.php
r7886 r10838 42 42 $poll_ans_result_sortby = strip_tags(trim($_POST['poll_ans_result_sortby'])); 43 43 $poll_ans_result_sortorder = strip_tags(trim($_POST['poll_ans_result_sortorder'])); 44 $poll_template_voteheader =trim($_POST['poll_template_voteheader']);45 $poll_template_votebody = trim($_POST['poll_template_votebody']);46 $poll_template_votefooter = trim($_POST['poll_template_votefooter']);47 $poll_template_resultheader = trim($_POST['poll_template_resultheader']);48 $poll_template_resultbody = trim($_POST['poll_template_resultbody']);49 $poll_template_resultbody2 = trim($_POST['poll_template_resultbody2']);50 $poll_template_resultfooter = trim($_POST['poll_template_resultfooter']);51 $poll_template_resultfooter2 = trim($_POST['poll_template_resultfooter2']);52 $poll_template_disable = trim($_POST['poll_template_disable']);53 $poll_template_error = trim($_POST['poll_template_error']);54 44 $poll_archive_perpage = intval($_POST['poll_archive_perpage']); 55 45 $poll_archive_url = strip_tags(trim($_POST['poll_archive_url'])); … … 67 57 $update_poll_queries[] = update_option('poll_ans_result_sortby', $poll_ans_result_sortby); 68 58 $update_poll_queries[] = update_option('poll_ans_result_sortorder', $poll_ans_result_sortorder); 69 $update_poll_queries[] = update_option('poll_template_voteheader', $poll_template_voteheader);70 $update_poll_queries[] = update_option('poll_template_votebody', $poll_template_votebody);71 $update_poll_queries[] = update_option('poll_template_votefooter', $poll_template_votefooter);72 $update_poll_queries[] = update_option('poll_template_resultheader', $poll_template_resultheader);73 $update_poll_queries[] = update_option('poll_template_resultbody', $poll_template_resultbody);74 $update_poll_queries[] = update_option('poll_template_resultbody2', $poll_template_resultbody2);75 $update_poll_queries[] = update_option('poll_template_resultfooter', $poll_template_resultfooter);76 $update_poll_queries[] = update_option('poll_template_resultfooter2', $poll_template_resultfooter2);77 $update_poll_queries[] = update_option('poll_template_disable', $poll_template_disable);78 $update_poll_queries[] = update_option('poll_template_error', $poll_template_error);79 59 $update_poll_queries[] = update_option('poll_archive_perpage', $poll_archive_perpage); 80 60 $update_poll_queries[] = update_option('poll_archive_url', $poll_archive_url); … … 90 70 $update_poll_text[] = __('Sort Poll Results By Option', 'wp-polls'); 91 71 $update_poll_text[] = __('Sort Order Of Poll Results Option', 'wp-polls'); 92 $update_poll_text[] = __('Voting Form Header Template', 'wp-polls');93 $update_poll_text[] = __('Voting Form Body Template', 'wp-polls');94 $update_poll_text[] = __('Voting Form Footer Template', 'wp-polls');95 $update_poll_text[] = __('Result Header Template', 'wp-polls');96 $update_poll_text[] = __('Result Body Template', 'wp-polls');97 $update_poll_text[] = __('Result Body2 Template', 'wp-polls');98 $update_poll_text[] = __('Result Footer Template', 'wp-polls');99 $update_poll_text[] = __('Result Footer2 Template', 'wp-polls');100 $update_poll_text[] = __('Poll Disabled Template', 'wp-polls');101 $update_poll_text[] = __('Poll Error Template', 'wp-polls');102 72 $update_poll_text[] = __('Archive Polls Per Page Option', 'wp-polls'); 103 73 $update_poll_text[] = __('Polls Archive URL Option', 'wp-polls'); … … 126 96 <script type="text/javascript"> 127 97 /* <![CDATA[*/ 128 function poll_default_templates(template) {129 var default_template;130 switch(template) {131 case "voteheader":132 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\">";133 break;134 case "votebody":135 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>";136 break;137 case "votefooter":138 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>";139 break;140 case "resultheader":141 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\">";142 break;143 case "resultbody":144 default_template = "<li>%POLL_ANSWER% <small>(%POLL_ANSWER_PERCENTAGE%%, %POLL_ANSWER_VOTES% Votes)</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>";145 break;146 case "resultbody2":147 default_template = "<li><strong><i>%POLL_ANSWER% <small>(%POLL_ANSWER_PERCENTAGE%%, %POLL_ANSWER_VOTES% Votes)</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>";148 break;149 case "resultfooter":150 default_template = "</ul>\n<p style=\"text-align: center;\"><?php _e('Total Voters', 'wp-polls'); ?>: <strong>%POLL_TOTALVOTERS%</strong></p>\n</div>";151 break;152 case "resultfooter2":153 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>";154 break;155 case "disable":156 default_template = "<?php _e('Sorry, there are no polls available at the moment.', 'wp-polls'); ?>";157 break;158 case "error":159 default_template = "<?php _e('An error has occurred when processing your poll.', 'wp-polls'); ?>";160 break;161 }162 document.getElementById("poll_template_" + template).value = default_template;163 }164 98 function set_pollbar_height(height) { 165 99 document.getElementById('poll_bar_height').value = height; … … 380 314 </td> 381 315 </tr> 316 <tr valign="top"> 317 <th align="left" colspan="2"><em><?php _e('Note: Only polls that are closed will be shown in the Poll Archive.', 'wp-polls'); ?></em></th> 318 </tr> 382 319 </table> 383 320 </fieldset> … … 392 329 <option value="-2"<?php selected(-2, get_option('poll_currentpoll')); ?>><?php _e('Display Random Poll', 'wp-polls'); ?></option> 393 330 <option value="0"<?php selected(0, get_option('poll_currentpoll')); ?>><?php _e('Display Latest Poll', 'wp-polls'); ?></option> 331 <?php if(function_exists('dynamic_sidebar')) { ?> 332 <option value="-3"<?php selected(-3, get_option('poll_currentpoll')); ?>><?php _e('Display Multiple Polls', 'wp-polls'); ?></option> 333 <?php } ?> 394 334 <option value="0"> </option> 395 335 <?php 396 $polls = $wpdb->get_results("SELECT pollq_id, pollq_question FROM $wpdb->pollsq ORDER BY pollq_id DESC");336 $polls = $wpdb->get_results("SELECT pollq_id, pollq_question FROM $wpdb->pollsq WHERE pollq_active = 1 ORDER BY pollq_id DESC"); 397 337 if($polls) { 398 338 foreach($polls as $poll) { … … 410 350 </td> 411 351 </tr> 352 <?php if(function_exists('dynamic_sidebar')) { ?> 353 <tr valign="top"> 354 <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 -> Sidebar Widgets -> Poll.', 'wp-polls'); ?></em></th> 355 </tr> 356 <?php } ?> 412 357 <tr valign="top"> 413 358 <th align="left" width="30%"><?php _e('When Poll Is Closed', 'wp-polls'); ?>:</th> … … 418 363 </select> 419 364 </td> 420 </tr>421 </table>422 </fieldset>423 <fieldset class="options">424 <legend><?php _e('Template Variables', 'wp-polls'); ?></legend>425 <table width="100%" border="0" cellspacing="0" cellpadding="5">426 <tr>427 <td>428 <strong>%POLL_ID%</strong><br />429 <?php _e('Display the poll\'s ID', 'wp-polls'); ?>430 </td>431 <td>432 <strong>%POLL_ANSWER_ID%</strong><br />433 <?php _e('Display the poll\'s answer ID', 'wp-polls'); ?>434 </td>435 </tr>436 <tr>437 <td>438 <strong>%POLL_QUESTION%</strong><br />439 <?php _e('Display the poll\'s question', 'wp-polls'); ?>440 </td>441 <td>442 <strong>%POLL_ANSWER%</strong><br />443 <?php _e('Display the poll\'s answer', 'wp-polls'); ?>444 </td>445 </tr>446 <tr>447 <td>448 <strong>%POLL_TOTALVOTES%</strong><br />449 <?php _e('Display the poll\'s total votes NOT the number of people who voted for the poll', 'wp-polls'); ?>450 </td>451 <td>452 <strong>%POLL_ANSWER_TEXT%</strong><br />453 <?php _e('Display the poll\'s answer without HTML formatting.', 'wp-polls'); ?>454 </td>455 </tr>456 <tr>457 <td>458 <strong>%POLL_RESULT_URL%</strong><br />459 <?php _e('Displays URL to poll\'s result', 'wp-polls'); ?>460 </td>461 <td>462 <strong>%POLL_ANSWER_VOTES%</strong><br />463 <?php _e('Display the poll\'s answer votes', 'wp-polls'); ?>464 </td>465 </tr>466 <tr>467 <td>468 <strong>%POLL_MOST_ANSWER%</strong><br />469 <?php _e('Display the poll\'s most voted answer', 'wp-polls'); ?>470 </td>471 <td>472 <strong>%POLL_ANSWER_PERCENTAGE%</strong><br />473 <?php _e('Display the poll\'s answer percentage', 'wp-polls'); ?>474 </td>475 </tr>476 <tr>477 <td>478 <strong>%POLL_MOST_VOTES%</strong><br />479 <?php _e('Display the poll\'s answer votes for the most voted answer', 'wp-polls'); ?>480 </td>481 <td>482 <strong>%POLL_ANSWER_IMAGEWIDTH%</strong><br />483 <?php _e('Display the poll\'s answer image width', 'wp-polls'); ?>484 </td>485 </tr>486 <tr>487 <td>488 <strong>%POLL_MOST_PERCENTAGE%</strong><br />489 <?php _e('Display the poll\'s answer percentage for the most voted answer', 'wp-polls'); ?>490 </td>491 <td>492 <strong>%POLL_LEAST_ANSWER%</strong><br />493 <?php _e('Display the poll\'s least voted answer', 'wp-polls'); ?>494 </td>495 </tr>496 <tr>497 <td><strong>%POLL_START_DATE%</strong><br />498 <?php _e('Display the poll\'s start date/time', 'wp-polls'); ?></td>499 <td><strong>%POLL_LEAST_VOTES%</strong><br />500 <?php _e('Display the poll\'s answer votes for the least voted answer', 'wp-polls'); ?>501 </td>502 </tr>503 <tr>504 <td><strong>%POLL_END_DATE%</strong><br />505 <?php _e('Display the poll\'s end date/time', 'wp-polls'); ?></td>506 <td>507 <strong>%POLL_LEAST_PERCENTAGE%</strong><br />508 <?php _e('Display the poll\'s answer percentage for the least voted answer', 'wp-polls'); ?>509 </td>510 </tr>511 <tr>512 <td><strong>%POLL_MULTIPLE_ANS_MAX%</strong><br />513 <?php _e('Display the the maximum number of answers the user can choose if the poll supports multiple answers', 'wp-polls'); ?></td>514 <td>515 <strong>%POLL_CHECKBOX_RADIO%</strong><br />516 <?php _e('Display "checkbox" or "radio" input types depending on the poll type', 'wp-polls'); ?>517 </td>518 </tr>519 <tr>520 <td><strong>%POLL_TOTALVOTERS%</strong><br />521 <?php _e('Display the number of people who voted for the poll NOT the total votes of the poll', 'wp-polls'); ?></td>522 <td> </td>523 </tr>524 <tr>525 <td colspan="2"><strong><?php _e('Note:', 'wp-polls'); ?></strong><br />526 <?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'); ?></td>527 </tr>528 </table>529 </fieldset>530 <fieldset class="options">531 <legend><?php _e('Poll Voting Form Templates', 'wp-polls'); ?></legend>532 <table width="100%" border="0" cellspacing="3" cellpadding="3">533 <tr valign="top">534 <td width="30%" align="left">535 <strong><?php _e('Voting Form Header:', 'wp-polls'); ?></strong><br /><br /><br />536 <?php _e('Allowed Variables:', 'wp-polls'); ?><br />537 - %POLL_ID%<br />538 - %POLL_QUESTION%<br />539 - %POLL_START_DATE%<br />540 - %POLL_END_DATE%<br />541 - %POLL_TOTALVOTES%<br />542 - %POLL_TOTALVOTERS%<br />543 - %POLL_MULTIPLE_ANS_MAX%<br /><br />544 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="javascript: poll_default_templates('voteheader');" class="button" />545 </td>546 <td align="left"><textarea cols="80" rows="10" id="poll_template_voteheader" name="poll_template_voteheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_voteheader'))); ?></textarea></td>547 </tr>548 <tr valign="top">549 <td width="30%" align="left">550 <strong><?php _e('Voting Form Body:', 'wp-polls'); ?></strong><br /><br /><br />551 <?php _e('Allowed Variables:', 'wp-polls'); ?><br />552 - %POLL_ID%<br />553 - %POLL_ANSWER_ID%<br />554 - %POLL_ANSWER%<br />555 - %POLL_ANSWER_VOTES%<br />556 - %POLL_CHECKBOX_RADIO%<br /><br />557 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="javascript: poll_default_templates('votebody');" class="button" />558 </td>559 <td align="left"><textarea cols="80" rows="10" id="poll_template_votebody" name="poll_template_votebody"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_votebody'))); ?></textarea></td>560 </tr>561 <tr valign="top">562 <td width="30%" align="left">563 <strong><?php _e('Voting Form Footer:', 'wp-polls'); ?></strong><br /><br /><br />564 <?php _e('Allowed Variables:', 'wp-polls'); ?><br />565 - %POLL_ID%<br />566 - %POLL_RESULT_URL%<br />567 - %POLL_MULTIPLE_ANS_MAX%<br /><br />568 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="javascript: poll_default_templates('votefooter');" class="button" />569 </td>570 <td align="left"><textarea cols="80" rows="10" id="poll_template_votefooter" name="poll_template_votefooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_votefooter'))); ?></textarea></td>571 </tr>572 </table>573 </fieldset>574 <fieldset class="options">575 <legend><?php _e('Poll Result Templates', 'wp-polls'); ?></legend>576 <table width="100%" border="0" cellspacing="3" cellpadding="3">577 <tr valign="top">578 <td width="30%" align="left">579 <strong><?php _e('Result Header:', 'wp-polls'); ?></strong><br /><br /><br />580 <?php _e('Allowed Variables:', 'wp-polls'); ?><br />581 - %POLL_ID%<br />582 - %POLL_QUESTION%<br />583 - %POLL_START_DATE%<br />584 - %POLL_END_DATE%<br />585 - %POLL_TOTALVOTES%<br />586 - %POLL_TOTALVOTERS%<br />587 - %POLL_MULTIPLE_ANS_MAX%<br /><br />588 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="javascript: poll_default_templates('resultheader');" class="button" />589 </td>590 <td align="left"><textarea cols="80" rows="10" id="poll_template_resultheader" name="poll_template_resultheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultheader'))); ?></textarea></td>591 </tr>592 <tr valign="top">593 <td width="30%" align="left">594 <strong><?php _e('Result Body:', 'wp-polls'); ?></strong><br /><?php _e('Normal', 'wp-polls'); ?><br /><br />595 <?php _e('Allowed Variables:', 'wp-polls'); ?><br />596 - %POLL_ANSWER_ID%<br />597 - %POLL_ANSWER%<br />598 - %POLL_ANSWER_TEXT%<br />599 - %POLL_ANSWER_VOTES%<br />600 - %POLL_ANSWER_PERCENTAGE%<br />601 - %POLL_ANSWER_IMAGEWIDTH%<br /><br />602 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="javascript: poll_default_templates('resultbody');" class="button" />603 </td>604 <td align="left"><textarea cols="80" rows="10" id="poll_template_resultbody" name="poll_template_resultbody"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultbody'))); ?></textarea></td>605 </tr>606 <tr valign="top">607 <td width="30%" align="left">608 <strong><?php _e('Result Body:', 'wp-polls'); ?></strong><br /><?php _e('Displaying Of User\'s Voted Answer', 'wp-polls'); ?><br /><br />609 <?php _e('Allowed Variables:', 'wp-polls'); ?><br />610 - %POLL_ANSWER_ID%<br />611 - %POLL_ANSWER%<br />612 - %POLL_ANSWER_TEXT%<br />613 - %POLL_ANSWER_VOTES%<br />614 - %POLL_ANSWER_PERCENTAGE%<br />615 - %POLL_ANSWER_IMAGEWIDTH%<br /><br />616 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="javascript: poll_default_templates('resultbody2');" class="button" />617 </td>618 <td align="left"><textarea cols="80" rows="10" id="poll_template_resultbody2" name="poll_template_resultbody2"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultbody2'))); ?></textarea></td>619 </tr>620 <tr valign="top">621 <td width="30%" align="left">622 <strong><?php _e('Result Footer:', 'wp-polls'); ?></strong><br /><?php _e('Normal', 'wp-polls'); ?><br /><br />623 <?php _e('Allowed Variables:', 'wp-polls'); ?><br />624 - %POLL_ID%<br />625 - %POLL_START_DATE%<br />626 - %POLL_END_DATE%<br />627 - %POLL_TOTALVOTES%<br />628 - %POLL_TOTALVOTERS%<br />629 - %POLL_MOST_ANSWER%<br />630 - %POLL_MOST_VOTES%<br />631 - %POLL_MOST_PERCENTAGE%<br />632 - %POLL_LEAST_ANSWER%<br />633 - %POLL_LEAST_VOTES%<br />634 - %POLL_LEAST_PERCENTAGE%<br />635 - %POLL_MULTIPLE_ANS_MAX%<br /><br />636 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="javascript: poll_default_templates('resultfooter');" class="button" />637 </td>638 <td align="left"><textarea cols="80" rows="10" id="poll_template_resultfooter" name="poll_template_resultfooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultfooter'))); ?></textarea></td>639 </tr>640 <tr valign="top">641 <td width="30%" align="left">642 <strong><?php _e('Result Footer:', 'wp-polls'); ?></strong><br /><?php _e('Displaying Of Vote Poll Link If User Has Not Voted', 'wp-polls'); ?><br /><br />643 <?php _e('Allowed Variables:', 'wp-polls'); ?><br />644 - %POLL_ID%<br />645 - %POLL_START_DATE%<br />646 - %POLL_END_DATE%<br />647 - %POLL_TOTALVOTES%<br />648 - %POLL_TOTALVOTERS%<br />649 - %POLL_MOST_ANSWER%<br />650 - %POLL_MOST_VOTES%<br />651 - %POLL_MOST_PERCENTAGE%<br />652 - %POLL_LEAST_ANSWER%<br />653 - %POLL_LEAST_VOTES%<br />654 - %POLL_LEAST_PERCENTAGE%<br />655 - %POLL_MULTIPLE_ANS_MAX%<br /><br />656 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="javascript: poll_default_templates('resultfooter2');" class="button" />657 </td>658 <td align="left"><textarea cols="80" rows="10" id="poll_template_resultfooter2" name="poll_template_resultfooter2"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultfooter2'))); ?></textarea></td>659 </tr>660 </table>661 </fieldset>662 <fieldset class="options">663 <legend><?php _e('Poll Misc Templates', 'wp-polls'); ?></legend>664 <table width="100%" border="0" cellspacing="3" cellpadding="3">665 <tr valign="top">666 <td width="30%" align="left">667 <strong><?php _e('Poll Disabled', 'wp-polls'); ?></strong><br /><br /><br />668 <?php _e('Allowed Variables:', 'wp-polls'); ?><br />669 - <?php _e('N/A', 'wp-polls'); ?><br /><br />670 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="javascript: poll_default_templates('disable');" class="button" />671 </td>672 <td align="left"><textarea cols="80" rows="10" id="poll_template_disable" name="poll_template_disable"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_disable'))); ?></textarea></td>673 </tr>674 <tr valign="top">675 <td width="30%" align="left">676 <strong><?php _e('Poll Error', 'wp-polls'); ?></strong><br /><br /><br />677 <?php _e('Allowed Variables:', 'wp-polls'); ?><br />678 - <?php _e('N/A', 'wp-polls'); ?><br /><br />679 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="javascript: poll_default_templates('error');" class="button" />680 </td>681 <td align="left"><textarea cols="80" rows="10" id="poll_template_error" name="poll_template_error"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_error'))); ?></textarea></td>682 365 </tr> 683 366 </table> wp-polls/trunk/polls/polls-usage.php
r7967 r10838 32 32 <?php _e("Add:", 'wp-polls'); ?> 33 33 <blockquote> 34 <pre class="wp-polls-usage-pre"><?php if (function_exists('vote_poll') && ! $in_pollsarchive): ?>34 <pre class="wp-polls-usage-pre"><?php if (function_exists('vote_poll') && !in_pollarchive()): ?> 35 35 <li> 36 36 <h2>Polls</h2> wp-polls/trunk/polls/polls-widget.php
r7886 r10838 41 41 $options = get_option('widget_polls'); 42 42 $title = htmlspecialchars($options['title']);
