PluginProbe
WP-EMail / 2.64
WP-EMail v2.64
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.64, at email-options.php

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