| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
if(!current_user_can('manage_polls')) { |
|---|
| 22 |
die('Access Denied'); |
|---|
| 23 |
} |
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 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 |
|
|---|
| 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" valign="top"> |
|---|
| 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 align="left" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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" valign="top"><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" valign="top"> |
|---|
| 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-p |
|---|