PluginProbe
WP-EMail / 2.50
WP-EMail v2.50
3.0.0 trunk 1.00 2.00b 2.01 2.02 2.03 2.04 2.04a 2.05 2.06 2.07 2.10 2.11 2.20 2.30 2.31 2.40 2.50 2.51 2.52 2.61 2.62 2.63 2.64 All 42 releases
wp-email / email-options.php

email-options.php in WP-EMail 2.50, at email-options.php

498 lines 28.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 +----------------------------------------------------------------+
4 | |
5 | WordPress 2.8 Plugin: WP-EMail 2.50 |
6 | Copyright (c) 2009 Lester "GaMerZ" Chan |
7 | |
8 | File Written By: |
9 | - Lester "GaMerZ" Chan |
10 | - http://lesterchan.net |
11 | |
12 | File Information: |
13 | - Configure E-Mail Options |
14 | - wp-content/plugins/wp-email/email-options.php |
15 | |
16 +----------------------------------------------------------------+
17 */
18
19
20 ### Check Whether User Can Manage EMail
21 if(!current_user_can('manage_email')) {
22 die('Access Denied');
23 }
24
25
26 ### E-Mail Variables
27 $base_name = plugin_basename('wp-email/email-options.php');
28 $base_page = 'admin.php?page='.$base_name;
29
30
31 ### If Form Is Submitted
32 if($_POST['Submit']) {
33 $email_smtp_name = strip_tags(trim($_POST['email_smtp_name']));
34 $email_smtp_password = strip_tags(trim($_POST['email_smtp_password']));
35 $email_smtp_server = strip_tags(trim($_POST['email_smtp_server']));
36 $email_smtp = array('username' => $email_smtp_name, 'password' => $email_smtp_password, 'server' => $email_smtp_server);
37 $email_options = array();
38 $email_options['post_text'] = addslashes(trim(wp_filter_post_kses($_POST['email_post_text'])));
39 $email_options['page_text'] = addslashes(trim(wp_filter_post_kses($_POST['email_page_text'])));
40 $email_options['email_icon'] = trim($_POST['email_icon']);
41 $email_options['email_type'] = intval($_POST['email_type']);
42 $email_options['email_style'] = intval($_POST['email_style']);
43 $email_options['email_html'] = trim($_POST['email_html']);
44 $email_fields = array();
45 $email_fields['yourname'] = intval($_POST['email_field_yourname']);
46 $email_fields['youremail'] = intval($_POST['email_field_youremail']);
47 $email_fields['yourremarks'] = intval($_POST['email_field_yourremarks']);
48 $email_fields['friendname'] = intval($_POST['email_field_friendname']);
49 $email_fields['friendemail'] = intval($_POST['email_field_friendemail']);
50 $email_contenttype = strip_tags(trim($_POST['email_contenttype']));
51 $email_mailer = strip_tags(trim($_POST['email_mailer']));
52 $email_snippet = intval(trim($_POST['email_snippet']));
53 $email_interval = intval(trim($_POST['email_interval']));
54 $email_multiple = intval(trim($_POST['email_multiple']));
55 $email_imageverify = intval(trim($_POST['email_imageverify']));
56 $email_template_title = trim(wp_filter_post_kses($_POST['email_template_title']));
57 $email_template_subtitle = trim(wp_filter_post_kses($_POST['email_template_subtitle']));
58 $email_template_subject = strip_tags(trim($_POST['email_template_subject']));
59 $email_template_body = trim(wp_filter_post_kses($_POST['email_template_body']));
60 $email_template_bodyalt = trim(wp_filter_post_kses($_POST['email_template_bodyalt']));
61 $email_template_sentsuccess = trim(wp_filter_post_kses($_POST['email_template_sentsuccess']));
62 $email_template_sentfailed = trim(wp_filter_post_kses($_POST['email_template_sentfailed']));
63 $email_template_error = trim(wp_filter_post_kses($_POST['email_template_error']));
64 $update_email_queries = array();
65 $update_email_text = array();
66 $update_email_queries[] = update_option('email_smtp', $email_smtp);
67 $update_email_queries[] = update_option('email_options', $email_options);
68 $update_email_queries[] = update_option('email_fields', $email_fields);
69 $update_email_queries[] = update_option('email_contenttype', $email_contenttype);
70 $update_email_queries[] = update_option('email_mailer', $email_mailer);
71 $update_email_queries[] = update_option('email_snippet', $email_snippet);
72 $update_email_queries[] = update_option('email_interval', $email_interval);
73 $update_email_queries[] = update_option('email_multiple', $email_multiple);
74 $update_email_queries[] = update_option('email_imageverify', $email_imageverify);
75 $update_email_queries[] = update_option('email_template_title', $email_template_title);
76 $update_email_queries[] = update_option('email_template_subtitle', $email_template_subtitle);
77 $update_email_queries[] = update_option('email_template_subject', $email_template_subject);
78 $update_email_queries[] = update_option('email_template_body', $email_template_body);
79 $update_email_queries[] = update_option('email_template_bodyalt', $email_template_bodyalt);
80 $update_email_queries[] = update_option('email_template_sentsuccess', $email_template_sentsuccess);
81 $update_email_queries[] = update_option('email_template_sentfailed', $email_template_sentfailed);
82 $update_email_queries[] = update_option('email_template_error', $email_template_error);
83 $update_email_text[] = __('SMTP Information', 'wp-email');
84 $update_email_text[] = __('E-Mail Style', 'wp-email');
85 $update_email_text[] = __('E-Mail Fields', 'wp-email');
86 $update_email_text[] = __('E-Mail Content Type', 'wp-email');
87 $update_email_text[] = __('Send E-Mail Method', 'wp-email');
88 $update_email_text[] = __('Snippet Option', 'wp-email');
89 $update_email_text[] = __('Interval Option', 'wp-email');
90 $update_email_text[] = __('Multiple E-Mails Option', 'wp-email');
91 $update_email_text[] = __('Image Verification Option', 'wp-email');
92 $update_email_text[] = __('Page Title Template', 'wp-email');
93 $update_email_text[] = __('Page Subtitle Template', 'wp-email');
94 $update_email_text[] = __('Subject Template', 'wp-email');
95 $update_email_text[] = __('Body Template', 'wp-email');
96 $update_email_text[] = __('Alternate Body Template', 'wp-email');
97 $update_email_text[] = __('Sent Success Template', 'wp-email');
98 $update_email_text[] = __('Sent Failed Template', 'wp-email');
99 $update_email_text[] = __('Error Template', 'wp-email');
100 $i=0;
101 $text = '';
102 foreach($update_email_queries as $update_email_query) {
103 if($update_email_query) {
104 $text .= '<font color="green">'.$update_email_text[$i].' '.__('Updated', 'wp-email').'</font><br />';
105 }
106 $i++;
107 }
108 if(empty($text)) {
109 $text = '<font color="red">'.__('No E-Mail Option Updated', 'wp-email').'</font>';
110 }
111 }
112 $email_options = get_option('email_options');
113 $email_fields = get_option('email_fields');
114 $email_smtp = get_option('email_smtp');
115 ?>
116 <script type="text/javascript">
117 /* <![CDATA[*/
118 function email_default_templates(template) {
119 var default_template;
120 switch(template) {
121 case "title":
122 default_template = "<?php _e('E-Mail \'%EMAIL_POST_TITLE%\' To A Friend', 'wp-email'); ?>";
123 break;
124 case "subtitle":
125 default_template = "<p style=\"text-align: center;\"><?php _e('Email a copy of <strong>\'%EMAIL_POST_TITLE%\'</strong> to a friend', 'wp-email'); ?></p>";
126 break;
127 case "subject":
128 default_template = "<?php _e('Recommended Article By %EMAIL_YOUR_NAME%: %EMAIL_POST_TITLE%', 'wp-email'); ?>";
129 break;
130 case "body":
131 default_template = "<?php _e('<p>Hi <strong>%EMAIL_FRIEND_NAME%</strong>,<br />Your friend, <strong>%EMAIL_YOUR_NAME%</strong>, has recommended this article entitled \'<strong>%EMAIL_POST_TITLE%</strong>\' to you.</p><p><strong>Here is his/her remarks:</strong><br />%EMAIL_YOUR_REMARKS%</p><p><strong>%EMAIL_POST_TITLE%</strong><br />Posted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%</p>%EMAIL_POST_CONTENT%<p>Article taken from %EMAIL_BLOG_NAME% - <a href=\"%EMAIL_BLOG_URL%\">%EMAIL_BLOG_URL%</a><br />URL to article: <a href=\"%EMAIL_PERMALINK%\">%EMAIL_PERMALINK%</a></p>', 'wp-email'); ?>";
132 break;
133 case "bodyalt":
134 default_template = "<?php _e('Hi %EMAIL_FRIEND_NAME%,\nYour friend, %EMAIL_YOUR_NAME%, has recommended this article entitled \'%EMAIL_POST_TITLE%\' to you.\n\nHere is his/her remark:\n%EMAIL_YOUR_REMARKS%\n\n%EMAIL_POST_TITLE%\nPosted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%\n%EMAIL_POST_CONTENT%\nArticle taken from %EMAIL_BLOG_NAME% - %EMAIL_BLOG_URL%\nURL to article: %EMAIL_PERMALINK%', 'wp-email'); ?>";
135 break;
136 case "sentsuccess":
137 default_template = "<p><?php _e('Article: <strong>%EMAIL_POST_TITLE%</strong> has been sent to <strong>%EMAIL_FRIEND_NAME% (%EMAIL_FRIEND_EMAIL%)</strong>', 'wp-email'); ?></p><p>&laquo; <a href=\"%EMAIL_PERMALINK%\"><?php _e('Back to %EMAIL_POST_TITLE%', 'wp-email'); ?></a></p>";
138 break;
139 case "sentfailed":
140 default_template = "<p><?php _e('An error has occurred when trying to send this email: ', 'wp-email'); ?><br /><strong>&raquo;</strong> %EMAIL_ERROR_MSG%</p>";
141 break;
142 case "error":
143 default_template = "<p><?php _e('An error has occurred: ', 'wp-email'); ?><br /><strong>&raquo;</strong> %EMAIL_ERROR_MSG%</p>";
144 break;
145 case "html":
146 default_template = '<a href="%EMAIL_URL%" rel="nofollow" title="%EMAIL_TEXT%">%EMAIL_TEXT%</a>';
147 break;
148 }
149 jQuery("#email_template_" + template).val(default_template);
150 }
151 function check_email_style() {
152 if (parseInt(jQuery("#email_style").val()) == 4) {
153 jQuery("#email_style_custom").show();
154 } else {
155 if(jQuery("#email_style_custom").is(":visible")) {
156 jQuery("#email_style_custom").hide();
157 }
158 }
159 }
160 /* ]]> */
161 </script>
162 <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
163 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
164 <div class="wrap">
165 <div id="icon-wp-email" class="icon32"><br /></div>
166 <h2><?php _e('E-Mail Options', 'wp-email'); ?></h2>
167 <h3><?php _e('SMTP Settings', 'wp-email'); ?></h3>
168 <table class="form-table">
169 <tr>
170 <th width="20%"><?php _e('SMTP Username:', 'wp-email'); ?></th>
171 <td><input type="text" name="email_smtp_name" value="<?php echo stripslashes($email_smtp['username']); ?>" size="30" dir="ltr" /></td>
172 </tr>
173 <tr>
174 <th width="20%"><?php _e('SMTP Password:', 'wp-email'); ?></th>
175 <td><input type="password" name="email_smtp_password" value="<?php echo stripslashes($email_smtp['password']); ?>" size="30" dir="ltr" /></td>
176 </tr>
177 <tr>
178 <th width="20%"><?php _e('SMTP Server:', 'wp-email'); ?></th>
179 <td><input type="text" name="email_smtp_server" value="<?php echo stripslashes($email_smtp['server']); ?>" size="30" dir="ltr" /><br /><?php _e('You may leave the above fields blank if you do not use a SMTP server.', 'wp-email'); ?></td>
180 </tr>
181 </table>
182 <h3><?php _e('E-Mail Styles', 'wp-email'); ?></h3>
183 <table class="form-table">
184 <tr>
185 <th scope="row" valign="top"><?php _e('E-Mail Text Link For Post', 'wp-email'); ?></th>
186 <td>
187 <input type="text" name="email_post_text" value="<?php echo stripslashes($email_options['post_text']); ?>" size="30" />
188 </td>
189 </tr>
190 <tr>
191 <th scope="row" valign="top"><?php _e('E-Mail Text Link For Page', 'wp-email'); ?></th>
192 <td>
193 <input type="text" name="email_page_text" value="<?php echo stripslashes($email_options['page_text']); ?>" size="30" />
194 </td>
195 </tr>
196 <tr>
197 <th scope="row" valign="top"><?php _e('E-Mail Icon', 'wp-email'); ?></th>
198 <td>
199 <?php
200 $email_icon = $email_options['email_icon'];
201 $email_icon_url = plugins_url('wp-email/images');
202 $email_icon_path = WP_PLUGIN_DIR.'/wp-email/images';
203 if($handle = @opendir($email_icon_path)) {
204 while (false !== ($filename = readdir($handle))) {
205 if ($filename != '.' && $filename != '..' && $filename != 'loading.gif') {
206 if(is_file($email_icon_path.'/'.$filename)) {
207 echo '<p>';
208 if($email_icon == $filename) {
209 echo '<input type="radio" name="email_icon" value="'.$filename.'" checked="checked" />'."\n";
210 } else {
211 echo '<input type="radio" name="email_icon" value="'.$filename.'" />'."\n";
212 }
213 echo '&nbsp;&nbsp;&nbsp;';
214 echo '<img src="'.$email_icon_url.'/'.$filename.'" alt="'.$filename.'" />'."\n";
215 echo '&nbsp;&nbsp;&nbsp;('.$filename.')';
216 echo '</p>'."\n";
217 }
218 }
219 }
220 closedir($handle);
221 }
222 ?>
223 </td>
224 </tr>
225 <tr>
226 <th scope="row" valign="top"><?php _e('E-Mail Link Type', 'wp-email'); ?></th>
227 <td>
228 <select name="email_type" size="1">
229 <option value="1"<?php selected('1', $email_options['email_type']); ?>><?php _e('E-Mail Standalone Page', 'wp-email'); ?></option>
230 <option value="2"<?php selected('2', $email_options['email_type']); ?>><?php _e('E-Mail Popup', 'wp-email'); ?></option>
231 </select>
232 </td>
233 </tr>
234 <tr>
235 <th scope="row" valign="top"><?php _e('E-Mail Text Link Style', 'wp-email'); ?></th>
236 <td>
237 <select name="email_style" id="email_style" size="1" onchange="check_email_style();">
238 <option value="1"<?php selected('1', $email_options['email_style']); ?>><?php _e('E-Mail Icon With Text Link', 'wp-email'); ?></option>
239 <option value="2"<?php selected('2', $email_options['email_style']); ?>><?php _e('E-Mail Icon Only', 'wp-email'); ?></option>
240 <option value="3"<?php selected('3', $email_options['email_style']); ?>><?php _e('E-Mail Text Link Only', 'wp-email'); ?></option>
241 <option value="4"<?php selected('4', $email_options['email_style']); ?>><?php _e('Custom', 'wp-email'); ?></option>
242 </select>
243 <div id="email_style_custom" style="display: <?php if(intval($email_options['email_style']) == 4) { echo 'block'; } else { echo 'none'; } ?>; margin-top: 20px;">
244 <textarea rows="2" cols="80" name="email_html" id="email_template_html"><?php echo htmlspecialchars(stripslashes($email_options['email_html'])); ?></textarea><br />
245 <?php _e('HTML is allowed.', 'wp-email'); ?><br />
246 %EMAIL_URL% - <?php _e('URL to the email post/page.', 'wp-email'); ?><br />
247 %EMAIL_POPUP% - <?php _e('It will produce the onclick html code which is nescassary for popup.', 'wp-email'); ?><br />
248 <?php _e('Example Popup Template:', 'wp-email'); ?><br />
249 <span dir="ltr"><?php echo htmlspecialchars('<a href="%EMAIL_URL%" %EMAIL_POPUP% rel="nofollow" title="%EMAIL_TEXT%">%EMAIL_TEXT%</a>'); ?></span><br />
250 %EMAIL_TEXT% - <?php _e('E-Mail text link of the post/page that you have typed in above.', 'wp-email'); ?><br />
251 %EMAIL_ICON_URL% - <?php _e('URL to the email icon you have chosen above.', 'wp-email'); ?><br />
252 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('html');" class="button" />
253 </div>
254 </td>
255 </tr>
256 </table>
257 <h3><?php _e('E-Mail Settings', 'wp-email'); ?></h3>
258 <table class="form-table">
259 <tr>
260 <th scope="row" valign="top"><?php _e('E-Mail Fields:', 'wp-email'); ?></th>
261 <td>
262 <input type="checkbox" name="email_field_yourname" value="1"<?php checked('1', $email_fields['yourname']); ?> />&nbsp;<?php _e('Your Name', 'wp-email'); ?><br />
263 <input type="checkbox" name="email_field_youremail" value="1"<?php checked('1', $email_fields['youremail']); ?> />&nbsp;<?php _e('Your E-Mail', 'wp-email'); ?><br />
264 <input type="checkbox" name="email_field_yourremarks" value="1"<?php checked('1', $email_fields['yourremarks']); ?> />&nbsp;<?php _e('Your Remarks', 'wp-email'); ?><br />
265 <input type="checkbox" name="email_field_friendname" value="1"<?php checked('1', $email_fields['friendname']); ?> />&nbsp;<?php _e('Friend\'s Name', 'wp-email'); ?><br />
266 <input type="checkbox" name="email_field_friendemail" value="1" checked="checked" disabled="disabled" />&nbsp;<?php _e('Friend\'s E-Mail', 'wp-email'); ?>
267 </td>
268 </tr>
269 <tr>
270 <th scope="row" valign="top"><?php _e('E-Mail Content Type:', 'wp-email'); ?></th>
271 <td>
272 <select name="email_contenttype" size="1">
273 <option value="text/plain"<?php selected('text/plain', get_option('email_contenttype')); ?>><?php _e('Plain Text', 'wp-email'); ?></option>
274 <option value="text/html"<?php selected('text/html', get_option('email_contenttype')); ?>><?php _e('HTML', 'wp-email'); ?></option>
275 </select>
276 </td>
277 </tr>
278 <tr>
279 <th scope="row" valign="top"><?php _e('Method Used To Send E-Mail:', 'wp-email'); ?></th>
280 <td>
281 <select name="email_mailer" size="1">
282 <option value="mail"<?php selected('mail', get_option('email_mailer')); ?>><?php _e('PHP', 'wp-email'); ?></option>
283 <option value="sendmail"<?php selected('sendmail', get_option('email_mailer')); ?>><?php _e('SendMail', 'wp-email'); ?></option>
284 <option value="smtp"<?php selected('smtp', get_option('email_mailer')); ?>><?php _e('SMTP', 'wp-email'); ?></option>
285 </select>
286 <br /><?php _e('If you ARE NOT using a smtp server or if there is a problem sending out email using your smtp server. Please Choose PHP or Send Mail.', 'wp-email'); ?>
287 </td>
288 </tr>
289 <tr>
290 <th scope="row" valign="top"><?php _e('No. Of Words Before Cutting Off:', 'wp-email'); ?></th>
291 <td><input type="text" id="email_snippet" name="email_snippet" value="<?php echo get_option('email_snippet'); ?>" size="5" maxlength="5" /><br /><?php _e('Setting this value more than 0 will enable the snippet feature. This feature will allow you to send a portion (defined by the text field above) of the article to your friend instead of the whole article.', 'wp-email'); ?></td>
292 </tr>
293 <tr>
294 <th scope="row" valign="top"><?php _e('Interval Between E-Mails:', 'wp-email'); ?></th>
295 <td><input type="text" id="email_interval" name="email_interval" value="<?php echo get_option('email_interval'); ?>" size="5" maxlength="5" /> <?php _e('Mins', 'wp-email'); ?><br /><?php _e('It allows you to specify the interval in minutes between each email sent per user based on IP to prevent spam and flood.', 'wp-email'); ?></td>
296 </tr>
297 <tr>
298 <th scope="row" valign="top"><?php _e('Max Number Of Multiple E-Mails:', 'wp-email'); ?></th>
299 <td><input type="text" id="email_multiple" name="email_multiple" value="<?php echo get_option('email_multiple'); ?>" size="5" maxlength="3" /><br /><?php _e('Setting this value more than 1 will enable this feature. It allows the maximum number of multiple e-mails that can be send at one go.', 'wp-email'); ?></td>
300 </tr>
301 <tr>
302 <th scope="row" valign="top"><?php _e('Enable Image Verification:', 'wp-email'); ?></th>
303 <td>
304 <select name="email_imageverify" size="1">
305 <option value="1"<?php selected('1', get_option('email_imageverify')); ?>><?php _e('Yes', 'wp-email'); ?></option>
306 <option value="0"<?php selected('0', get_option('email_imageverify')); ?>><?php _e('No', 'wp-email'); ?></option>
307 </select><br /><?php _e('It is recommanded to choose <strong>Yes</strong> unless your server does not support PHP GD Library.', 'wp-email'); ?>
308 </td>
309 </tr>
310 </table>
311
312 <h3><?php _e('Template Variables', 'wp-email'); ?></h3>
313 <table class="widefat">
314 <tr>
315 <td><strong>%EMAIL_YOUR_NAME%</strong> - <?php _e('Display the sender\'s name', 'wp-email'); ?></td>
316 <td><strong>%EMAIL_POST_TITLE%</strong> - <?php _e('Display the post\'s title', 'wp-email'); ?></td>
317 </tr>
318 <tr class="alternate">
319 <td><strong>%EMAIL_YOUR_EMAIL%</strong> - <?php _e('Display the sender\'s email', 'wp-email'); ?></td>
320 <td><strong>%EMAIL_POST_AUTHOR%</strong> - <?php _e('Display the post\'s author', 'wp-email'); ?></td>
321 </tr>
322 <tr>
323 <td><strong>%EMAIL_YOUR_REMARKS%</strong> - <?php _e('Display the sender\'s remarks', 'wp-email'); ?></td>
324 <td><strong>%EMAIL_POST_DATE%</strong> - <?php _e('Display the post\'s date', 'wp-email'); ?></td>
325 </tr>
326 <tr class="alternate">
327 <td><strong>%EMAIL_FRIEND_NAME%</strong> - <?php _e('Display the friend\'s name', 'wp-email'); ?></td>
328 <td><strong>%EMAIL_POST_CATEGORY%</strong> - <?php _e('Display the post\'s category', 'wp-email'); ?></td>
329 </tr>
330 <tr>
331 <td><strong>%EMAIL_FRIEND_EMAIL%</strong> - <?php _e('Display the friend\'s email', 'wp-email'); ?></td>
332 <td><strong>%EMAIL_POST_EXCERPT%</strong> - <?php _e('Display the post\'s excerpt', 'wp-email'); ?></td>
333 </tr>
334 <tr class="alternate">
335 <td><strong>%EMAIL_ERROR_MSG%</strong> - <?php _e('Display the error message', 'wp-email'); ?></td>
336 <td><strong>%EMAIL_POST_CONTENT%</strong> - <?php _e('Display the post\'s content', 'wp-email'); ?></td>
337 </tr>
338 <tr>
339 <td><strong>%EMAIL_BLOG_NAME%</strong> - <?php _e('Display the blog\'s name', 'wp-email'); ?></td>
340 <td><strong>%EMAIL_PERMALINK%</strong> - <?php _e('Display the permalink of the post', 'wp-email'); ?></td>
341 </tr>
342 <tr class="alternate">
343 <td><strong>%EMAIL_BLOG_URL%</strong> - <?php _e('Display the blog\'s url', 'wp-email'); ?></td>
344 <td>&nbsp;</td>
345 </tr>
346 </table>
347
348 <h3><?php _e('E-Mail Page Templates', 'wp-email'); ?></h3>
349 <table class="form-table">
350 <tr>
351 <td width="30%">
352 <strong><?php _e('E-Mail Page Title:', 'wp-email'); ?></strong><br /><br />
353 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
354 <p style="margin: 2px 0;">- %EMAIL_POST_TITLE%</p>
355 <p style="margin: 2px 0;">- %EMAIL_POST_AUTHOR%</p>
356 <p style="margin: 2px 0;">- %EMAIL_POST_DATE%</p>
357 <p style="margin: 2px 0;">- %EMAIL_POST_CATEGORY%</p>
358 <p style="margin: 2px 0;">- %EMAIL_BLOG_NAME%</p>
359 <p style="margin: 2px 0;">- %EMAIL_BLOG_URL%</p>
360 <p style="margin: 2px 0;">- %EMAIL_PERMALINK%</p><br />
361 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('title');" class="button" />
362 </td>
363 <td><input type="text" id="email_template_title" name="email_template_title" value="<?php echo htmlspecialchars(stripslashes(get_option('email_template_title'))); ?>" size="82" /></td>
364 </tr>
365 <tr>
366 <td width="30%">
367 <strong><?php _e('E-Mail Page Subtitle:', 'wp-email'); ?></strong><br /><br />
368 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
369 <p style="margin: 2px 0;">- %EMAIL_POST_TITLE%</p>
370 <p style="margin: 2px 0;">- %EMAIL_POST_AUTHOR%</p>
371 <p style="margin: 2px 0;">- %EMAIL_POST_DATE%</p>
372 <p style="margin: 2px 0;">- %EMAIL_POST_CATEGORY%</p>
373 <p style="margin: 2px 0;">- %EMAIL_BLOG_NAME%</p>
374 <p style="margin: 2px 0;">- %EMAIL_BLOG_URL%</p>
375 <p style="margin: 2px 0;">- %EMAIL_PERMALINK%</p><br />
376 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('subtitle');" class="button" />
377 </td>
378 <td><input type="text" id="email_template_subtitle" name="email_template_subtitle" value="<?php echo htmlspecialchars(stripslashes(get_option('email_template_subtitle'))); ?>" size="82" /></td>
379 </tr>
380 </table>
381
382 <h3><?php _e('E-Mail Templates', 'wp-email'); ?></h3>
383 <table class="form-table">
384 <tr>
385 <td width="30%">
386 <strong><?php _e('E-Mail Subject:', 'wp-email'); ?></strong><br /><br />
387 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
388 <p style="margin: 2px 0;">- %EMAIL_YOUR_NAME%</p>
389 <p style="margin: 2px 0;">- %EMAIL_YOUR_EMAIL%</p>
390 <p style="margin: 2px 0;">- %EMAIL_POST_TITLE%</p>
391 <p style="margin: 2px 0;">- %EMAIL_POST_AUTHOR%</p>
392 <p style="margin: 2px 0;">- %EMAIL_POST_DATE%</p>
393 <p style="margin: 2px 0;">- %EMAIL_POST_CATEGORY%</p>
394 <p style="margin: 2px 0;">- %EMAIL_BLOG_NAME%</p>
395 <p style="margin: 2px 0;">- %EMAIL_BLOG_URL%</p>
396 <p style="margin: 2px 0;">- %EMAIL_PERMALINK%</p><br />
397 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('subject');" class="button" />
398 </td>
399 <td><input type="text" id="email_template_subject" name="email_template_subject" value="<?php echo htmlspecialchars(stripslashes(get_option('email_template_subject'))); ?>" size="82" /></td>
400 </tr>
401 <tr>
402 <td width="30%">
403 <strong><?php _e('E-Mail Body:', 'wp-email'); ?></strong><br /><br />
404 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
405 <p style="margin: 2px 0;">- %EMAIL_YOUR_NAME%</p>
406 <p style="margin: 2px 0;">- %EMAIL_YOUR_EMAIL%</p>
407 <p style="margin: 2px 0;">- %EMAIL_YOUR_REMARKS%</p>
408 <p style="margin: 2px 0;">- %EMAIL_FRIEND_NAME%</p>
409 <p style="margin: 2px 0;">- %EMAIL_FRIEND_EMAIL%</p>
410 <p style="margin: 2px 0;">- %EMAIL_POST_TITLE%</p>
411 <p style="margin: 2px 0;">- %EMAIL_POST_AUTHOR%</p>
412 <p style="margin: 2px 0;">- %EMAIL_POST_DATE%</p>
413 <p style="margin: 2px 0;">- %EMAIL_POST_CATEGORY%</p>
414 <p style="margin: 2px 0;">- %EMAIL_POST_EXCERPT%</p>
415 <p style="margin: 2px 0;">- %EMAIL_POST_CONTENT%</p>
416 <p style="margin: 2px 0;">- %EMAIL_BLOG_NAME%</p>
417 <p style="margin: 2px 0;">- %EMAIL_BLOG_URL%</p>
418 <p style="margin: 2px 0;">- %EMAIL_PERMALINK%</p><br />
419 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('body');" class="button" />
420 </td>
421 <td><textarea cols="80" rows="15" id="email_template_body" name="email_template_body"><?php echo htmlspecialchars(stripslashes(get_option('email_template_body'))); ?></textarea></td>
422 </tr>
423 <tr>
424 <td width="30%">
425 <strong><?php _e('E-Mail Alternate Body:', 'wp-email'); ?></strong><br /><br />
426 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
427 <p style="margin: 2px 0;">- %EMAIL_YOUR_NAME%</p>
428 <p style="margin: 2px 0;">- %EMAIL_YOUR_EMAIL%</p>
429 <p style="margin: 2px 0;">- %EMAIL_YOUR_REMARKS%</p>
430 <p style="margin: 2px 0;">- %EMAIL_FRIEND_NAME%</p>
431 <p style="margin: 2px 0;">- %EMAIL_FRIEND_EMAIL%</p>
432 <p style="margin: 2px 0;">- %EMAIL_POST_TITLE%</p>
433 <p style="margin: 2px 0;">- %EMAIL_POST_AUTHOR%</p>
434 <p style="margin: 2px 0;">- %EMAIL_POST_DATE%</p>
435 <p style="margin: 2px 0;">- %EMAIL_POST_CATEGORY%</p>
436 <p style="margin: 2px 0;">- %EMAIL_POST_EXCERPT%</p>
437 <p style="margin: 2px 0;">- %EMAIL_POST_CONTENT%</p>
438 <p style="margin: 2px 0;">- %EMAIL_BLOG_NAME%</p>
439 <p style="margin: 2px 0;">- %EMAIL_BLOG_URL%</p>
440 <p style="margin: 2px 0;">- %EMAIL_PERMALINK%</p><br />
441 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('bodyalt');" class="button" />
442 </td>
443 <td><textarea cols="80" rows="15" id="email_template_bodyalt" name="email_template_bodyalt"><?php echo htmlspecialchars(stripslashes(get_option('email_template_bodyalt'))); ?></textarea></td>
444 </tr>
445 </table>
446
447 <h3><?php _e('After Sending E-Mail Templates', 'wp-email'); ?></h3>
448 <table class="form-table">
449 <tr>
450 <td width="30%">
451 <strong><?php _e('Sent Successfully:', 'wp-email'); ?></strong><br /><br />
452 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
453 <p style="margin: 2px 0;">- %EMAIL_FRIEND_NAME%</p>
454 <p style="margin: 2px 0;">- %EMAIL_FRIEND_EMAIL%</p>
455 <p style="margin: 2px 0;">- %EMAIL_POST_TITLE%</p>
456 <p style="margin: 2px 0;">- %EMAIL_BLOG_NAME%</p>
457 <p style="margin: 2px 0;">- %EMAIL_BLOG_URL%</p>
458 <p style="margin: 2px 0;">- %EMAIL_PERMALINK%</p><br />
459 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('sentsuccess');" class="button" />
460 </td>
461 <td><textarea cols="80" rows="10" id="email_template_sentsuccess" name="email_template_sentsuccess"><?php echo htmlspecialchars(stripslashes(get_option('email_template_sentsuccess'))); ?></textarea></td>
462 </tr>
463 <tr>
464 <td width="30%">
465 <strong><?php _e('Sent Failed:', 'wp-email'); ?></strong><br /><br />
466 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
467 <p style="margin: 2px 0;">- %EMAIL_FRIEND_NAME%</p>
468 <p style="margin: 2px 0;">- %EMAIL_FRIEND_EMAIL%</p>
469 <p style="margin: 2px 0;">- %EMAIL_ERROR_MSG%</p>
470 <p style="margin: 2px 0;">- %EMAIL_POST_TITLE%</p>
471 <p style="margin: 2px 0;">- %EMAIL_BLOG_NAME%</p>
472 <p style="margin: 2px 0;">- %EMAIL_BLOG_URL%</p>
473 <p style="margin: 2px 0;">- %EMAIL_PERMALINK%</p><br />
474 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('sentfailed');" class="button" />
475 </td>
476 <td><textarea cols="80" rows="10" id="email_template_sentfailed" name="email_template_sentfailed"><?php echo htmlspecialchars(stripslashes(get_option('email_template_sentfailed'))); ?></textarea></td>
477 </tr>
478 </table>
479 <h3><?php _e('E-Mail Misc Templates', 'wp-email'); ?></h3>
480 <table class="form-table">
481 <tr>
482 <td width="30%">
483 <strong><?php _e('E-Mail Error:', 'wp-email'); ?></strong><br /><br />
484 <?php _e('Allowed Variables:', 'wp-email'); ?>
485 <p style="margin: 2px 0;">- %EMAIL_ERROR_MSG%</p>
486 <p style="margin: 2px 0;">- %EMAIL_BLOG_NAME%</p>
487 <p style="margin: 2px 0;">- %EMAIL_BLOG_URL%</p>
488 <p style="margin: 2px 0;">- %EMAIL_PERMALINK%</p><br />
489 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('error');" class="button" />
490 </td>
491 <td><textarea cols="80" rows="10" id="email_template_error" name="email_template_error"><?php echo htmlspecialchars(stripslashes(get_option('email_template_error'))); ?></textarea></td>
492 </tr>
493 </table>
494 <p class="submit">
495 <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-email'); ?>" />
496 </p>
497 </div>
498 </form>