root/wp-email/trunk/email-options.php

Revision 52843, 27.2 kB (checked in by GamerZ, 4 days ago)

Works For WordPress 2.6

Line 
1 <?php
2 /*
3 +----------------------------------------------------------------+
4 |                                                                                            |
5 |    WordPress 2.5 Plugin: WP-EMail 2.31                                        |
6 |    Copyright (c) 2008 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($_POST['email_post_text']));
39     $email_options['page_text'] = addslashes(trim($_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($_POST['email_template_title']);
57     $email_template_subtitle = trim($_POST['email_template_subtitle']);
58     $email_template_subject = strip_tags(trim($_POST['email_template_subject']));
59     $email_template_body = trim($_POST['email_template_body']);
60     $email_template_bodyalt = trim($_POST['email_template_bodyalt']);
61     $email_template_sentsuccess = trim($_POST['email_template_sentsuccess']);
62     $email_template_sentfailed = trim($_POST['email_template_sentfailed']);
63     $email_template_error = trim($_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 $emai_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         document.getElementById("email_template_" + template).value = default_template;
150     }
151     function check_email_style() {
152         email_style_options = document.getElementById("email_style").value;
153         if (email_style_options == 4) {
154                 document.getElementById("email_style_custom").style.display = 'block';
155         } else {
156             if(document.getElementById("email_style_custom").style.display == 'block') {
157                 document.getElementById("email_style_custom").style.display = 'none';
158             }
159         }
160     }
161 /* ]]> */
162 </script>
163 <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
164 <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
165 <div class="wrap">
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 align="left" width="20%"><?php _e('SMTP Username:', 'wp-email'); ?></th>
171             <td><input type="text" name="email_smtp_name" value="<?php echo $emai_smtp['username']; ?>" size="30" /></td>
172         </tr>
173         <tr>
174             <th align="left" width="20%"><?php _e('SMTP Password:', 'wp-email'); ?></th>
175             <td><input type="password" name="email_smtp_password" value="<?php echo $emai_smtp['password']; ?>" size="30" /></td>
176         </tr>
177         <tr>
178             <th align="left" width="20%"><?php _e('SMTP Server:', 'wp-email'); ?></th>
179             <td><input type="text" name="email_smtp_server" value="<?php echo $emai_smtp['server']; ?>" size="30" /><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 = WP_PLUGIN_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                                     if($email_icon == $filename) {
208                                         echo '<input type="radio" name="email_icon" value="'.$filename.'" checked="checked" />'."\n";                                       
209                                     } else {
210                                         echo '<input type="radio" name="email_icon" value="'.$filename.'" />'."\n";
211                                     }
212                                     echo '&nbsp;&nbsp;&nbsp;';
213                                     echo '<img src="'.$email_icon_url.'/'.$filename.'" alt="'.$filename.'" />'."\n";
214                                     echo '&nbsp;&nbsp;&nbsp;('.$filename.')';
215                                     echo '<br /><br />'."\n";
216                                 }
217                             }
218                         }
219                         closedir($handle);
220                     }
221                 ?>
222             </td>
223         </tr>
224         <tr>
225             <th scope="row" valign="top"><?php _e('E-Mail Link Type', 'wp-email'); ?></th>
226             <td>
227                 <select name="email_type" size="1">
228                     <option value="1"<?php selected('1', $email_options['email_type']); ?>><?php _e('E-Mail Standalone Page', 'wp-email'); ?></option>
229                     <option value="2"<?php selected('2', $email_options['email_type']); ?>><?php _e('E-Mail Popup', 'wp-email'); ?></option>
230                 </select>
231             </td>
232         </tr>
233         <tr>
234             <th scope="row" valign="top"><?php _e('E-Mail Text Link Style', 'wp-email'); ?></th>
235             <td>
236                 <select name="email_style" id="email_style" size="1" onchange="check_email_style();">
237                     <option value="1"<?php selected('1', $email_options['email_style']); ?>><?php _e('E-Mail Icon With Text Link', 'wp-email'); ?></option>
238                     <option value="2"<?php selected('2', $email_options['email_style']); ?>><?php _e('E-Mail Icon Only', 'wp-email'); ?></option>
239                     <option value="3"<?php selected('3', $email_options['email_style']); ?>><?php _e('E-Mail Text Link Only', 'wp-email'); ?></option>
240                     <option value="4"<?php selected('4', $email_options['email_style']); ?>><?php _e('Custom', 'wp-email'); ?></option>
241                 </select>
242                 <div id="email_style_custom" style="display: <?php if(intval($email_options['email_style']) == 4) { echo 'block'; } else { echo 'none'; } ?>; margin-top: 20px;">
243                     <textarea rows="2" cols="80" name="email_html" id="email_template_html"><?php echo htmlspecialchars(stripslashes($email_options['email_html'])); ?></textarea><br />
244                     <?php _e('HTML is allowed.', 'wp-email'); ?><br />
245                     %EMAIL_URL% - <?php _e('URL to the email post/page.', 'wp-email'); ?><br />
246                     %EMAIL_POPUP% - <?php _e('It will produce the onclick html code which is nescassary for popup.', 'wp-email'); ?><br />
247                     <?php _e('Example Popup Template:', 'wp-email'); ?><br />
248                     <?php echo htmlspecialchars('<a href="%EMAIL_URL%" %EMAIL_POPUP% rel="nofollow" title="%EMAIL_TEXT%">%EMAIL_TEXT%</a>'); ?><br />
249                     %EMAIL_TEXT% - <?php _e('E-Mail text link of the post/page that you have typed in above.', 'wp-email'); ?><br />
250                     %EMAIL_ICON_URL% - <?php _e('URL to the email icon you have chosen above.', 'wp-email'); ?><br />
251                     <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('html');" class="button" />
252                 </div>
253             </td>
254         </tr>
255     </table>
256     <h3><?php _e('E-Mail Settings', 'wp-email'); ?></h3>
257     <table class="form-table">
258         <tr>
259             <th scope="row" valign="top"><?php _e('E-Mail Fields:', 'wp-email'); ?></th>
260              <td>
261                 <input type="checkbox" name="email_field_yourname" value="1"<?php checked('1', $email_fields['yourname']); ?> />&nbsp;<?php _e('Your Name', 'wp-email'); ?><br />
262                 <input type="checkbox" name="email_field_youremail" value="1"<?php checked('1', $email_fields['youremail']); ?> />&nbsp;<?php _e('Your E-Mail', 'wp-email'); ?><br />
263                 <input type="checkbox" name="email_field_yourremarks" value="1"<?php checked('1', $email_fields['yourremarks']); ?> />&nbsp;<?php _e('Your Remarks', 'wp-email'); ?><br />
264                 <input type="checkbox" name="email_field_friendname" value="1"<?php checked('1', $email_fields['friendname']); ?> />&nbsp;<?php _e('Friend\'s Name', 'wp-email'); ?><br />
265                 <input type="checkbox" name="email_field_friendemail" value="1" checked="checked" disabled="disabled" />&nbsp;<?php _e('Friend\'s E-Mail', 'wp-email'); ?>
266             </td>
267         </tr>
268          <tr>
269             <th scope="row" valign="top"><?php _e('E-Mail Content Type:', 'wp-email'); ?></th>
270              <td>
271                 <select name="email_contenttype" size="1">
272                     <option value="text/plain"<?php selected('text/plain', get_option('email_contenttype')); ?>><?php _e('Plain Text', 'wp-email'); ?></option>
273                     <option value="text/html"<?php selected('text/html', get_option('email_contenttype')); ?>><?php _e('HTML', 'wp-email'); ?></option>
274                 </select>
275             </td>
276         </tr>
277         <tr>
278             <th scope="row" valign="top"><?php _e('Method Used To Send E-Mail:', 'wp-email'); ?></th>
279             <td>
280                 <select name="email_mailer" size="1">
281                     <option value="mail"<?php selected('mail', get_option('email_mailer')); ?>><?php _e('PHP', 'wp-email'); ?></option>
282                     <option value="sendmail"<?php selected('sendmail', get_option('email_mailer')); ?>><?php _e('SendMail', 'wp-email'); ?></option>
283                     <option value="smtp"<?php selected('smtp', get_option('email_mailer')); ?>><?php _e('SMTP', 'wp-email'); ?></option>
284                 </select>
285                 <br /><?php _e('If you ARE NOT using a smtp server of if there is a problem sending out email using your smtp server. Please Choose PHP or Send Mail.', 'wp-email'); ?>
286             </td>
287         </tr>
288         <tr>
289             <th scope="row" valign="top"><?php _e('No. Of Words Before Cutting Off:', 'wp-email'); ?></th>
290             <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>
291         </tr>
292         <tr>
293             <th scope="row" valign="top"><?php _e('Interval Between E-Mails:', 'wp-email'); ?></th>
294             <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>
295         </tr>
296         <tr>
297                 <th scope="row" valign="top"><?php _e('Max Number Of Multiple E-Mails:', 'wp-email'); ?></th>
298                 <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>
299         </tr>
300         <tr>
301             <th scope="row" valign="top"><?php _e('Enable Image Verification:', 'wp-email'); ?></th>
302             <td>
303                 <select name="email_imageverify" size="1">
304                     <option value="1"<?php selected('1', get_option('email_imageverify')); ?>><?php _e('Yes', 'wp-email'); ?></option>
305                     <option value="0"<?php selected('0', get_option('email_imageverify')); ?>><?php _e('No', 'wp-email'); ?></option>
306                 </select><br /><?php _e('It is recommanded to choose <strong>Yes</strong> unless your server does not support PHP GD Library.', 'wp-email'); ?>
307             </td>
308         </tr>
309     </table>
310
311     <h3><?php _e('Template Variables', 'wp-email'); ?></h3>
312     <table class="widefat">
313         <tr>
314             <td><strong>%EMAIL_YOUR_NAME%</strong> - <?php _e('Display the sender\'s name', 'wp-email'); ?></td>
315             <td><strong>%EMAIL_POST_TITLE%</strong> - <?php _e('Display the post\'s title', 'wp-email'); ?></td>
316         </tr>
317         <tr class="alternate">
318             <td><strong>%EMAIL_YOUR_EMAIL%</strong> - <?php _e('Display the sender\'s email', 'wp-email'); ?></td>
319             <td><strong>%EMAIL_POST_AUTHOR%</strong> - <?php _e('Display the post\'s author', 'wp-email'); ?></td>
320         </tr>
321         <tr>
322             <td><strong>%EMAIL_YOUR_REMARKS%</strong> - <?php _e('Display the sender\'s remarks', 'wp-email'); ?></td>
323             <td><strong>%EMAIL_POST_DATE%</strong> - <?php _e('Display the post\'s date', 'wp-email'); ?></td>
324         </tr>
325         <tr class="alternate">
326             <td><strong>%EMAIL_FRIEND_NAME%</strong> - <?php _e('Display the friend\'s name', 'wp-email'); ?></td>
327             <td><strong>%EMAIL_POST_CATEGORY%</strong> - <?php _e('Display the post\'s category', 'wp-email'); ?></td>
328         </tr>
329         <tr>
330             <td><strong>%EMAIL_FRIEND_EMAIL%</strong> - <?php _e('Display the friend\'s email', 'wp-email'); ?></td>
331             <td><strong>%EMAIL_POST_EXCERPT%</strong> - <?php _e('Display the post\'s excerpt', 'wp-email'); ?></td>
332         </tr>
333         <tr class="alternate">
334             <td><strong>%EMAIL_ERROR_MSG%</strong> - <?php _e('Display the error message', 'wp-email'); ?></td>
335             <td><strong>%EMAIL_POST_CONTENT%</strong> - <?php _e('Display the post\'s content', 'wp-email'); ?></td>
336         </tr>
337         <tr>
338             <td><strong>%EMAIL_BLOG_NAME%</strong> - <?php _e('Display the blog\'s name', 'wp-email'); ?></td>
339             <td><strong>%EMAIL_PERMALINK%</strong> - <?php _e('Display the permalink of the post', 'wp-email'); ?></td>
340         </tr>
341         <tr class="alternate">
342             <td><strong>%EMAIL_BLOG_URL%</strong> - <?php _e('Display the blog\'s url', 'wp-email'); ?></td>
343             <td>&nbsp;</td>
344         </tr>
345     </table>
346
347     <h3><?php _e('E-Mail Page Templates', 'wp-email'); ?></h3>
348     <table class="form-table">
349          <tr>
350             <td align="left" width="30%">
351                 <strong><?php _e('E-Mail Page Title:', 'wp-email'); ?></strong><br /><br />
352                 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
353                 - %EMAIL_POST_TITLE%<br />
354                 - %EMAIL_POST_AUTHOR%<br />
355                 - %EMAIL_POST_DATE%<br />
356                 - %EMAIL_POST_CATEGORY%<br />
357                 - %EMAIL_BLOG_NAME%<br />
358                 - %EMAIL_BLOG_URL%<br />
359                 - %EMAIL_PERMALINK%<br /><br />
360                 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('title');" class="button" />
361             </td>
362             <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>
363         </tr>
364         <tr>
365             <td align="left" width="30%">
366                 <strong><?php _e('E-Mail Page Subtitle:', 'wp-email'); ?></strong><br /><br />
367                 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
368                 - %EMAIL_POST_TITLE%<br />
369                 - %EMAIL_POST_AUTHOR%<br />
370                 - %EMAIL_POST_DATE%<br />
371                 - %EMAIL_POST_CATEGORY%<br />
372                 - %EMAIL_BLOG_NAME%<br />
373                 - %EMAIL_BLOG_URL%<br />
374                 - %EMAIL_PERMALINK%<br /><br />
375                 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('subtitle');" class="button" />
376             </td>
377             <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>
378         </tr>
379     </table>
380
381     <h3><?php _e('E-Mail Templates', 'wp-email'); ?></h3>
382     <table class="form-table">
383          <tr>
384             <td align="left" width="30%">
385                 <strong><?php _e('E-Mail Subject:', 'wp-email'); ?></strong><br /><br />
386                 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
387                 - %EMAIL_YOUR_NAME%<br />
388                 - %EMAIL_YOUR_EMAIL%<br />
389                 - %EMAIL_POST_TITLE%<br />
390                 - %EMAIL_POST_AUTHOR%<br />
391                 - %EMAIL_POST_DATE%<br />
392                 - %EMAIL_POST_CATEGORY%<br />
393                 - %EMAIL_BLOG_NAME%<br />
394                 - %EMAIL_BLOG_URL%<br />
395                 - %EMAIL_PERMALINK%<br /><br />
396                 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('subject');" class="button" />
397             </td>
398             <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>
399         </tr>
400         <tr>
401             <td align="left" width="30%">
402                 <strong><?php _e('E-Mail Body:', 'wp-email'); ?></strong><br /><br />
403                 <?php _e('Allowed Variables:', 'wp-email'); ?><br />
404                 - %EMAIL_YOUR_NAME%<br />
405                 - %EMAIL_YOUR_EMAIL%<br />
406                 - %EMAIL_YOUR_REMARKS%<br />
407                 - %EMAIL_FRIEND_NAME%<br />
408                 - %EMAIL