Contact Form 7 - Version 1.4

Version Description

Download this release

Release Info

Developer takayukister
Plugin Icon 128x128 Contact Form 7
Version 1.4
Comparing to
See all releases

Code changes from version 1.3.2 to 1.4

README.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: takayukister
3
  Tags: contact form, email, ajax
4
  Requires at least: 2.2
5
- Tested up to: 2.3-beta1
6
- Stable tag: 1.3.2
7
 
8
  Just another contact form plugin. Simple but flexible.
9
 
@@ -14,6 +14,16 @@ Just another contact form plugin. Simple but flexible.
14
  * Supports multiple contact forms.
15
  * You can customize form and mail contents with simple markup.
16
  * Client side validation and AJAX submitting with jQuery Form Plugin.
 
 
 
 
 
 
 
 
 
 
17
 
18
  == Installation ==
19
 
2
  Contributors: takayukister
3
  Tags: contact form, email, ajax
4
  Requires at least: 2.2
5
+ Tested up to: 2.3-beta2
6
+ Stable tag: 1.4
7
 
8
  Just another contact form plugin. Simple but flexible.
9
 
14
  * Supports multiple contact forms.
15
  * You can customize form and mail contents with simple markup.
16
  * Client side validation and AJAX submitting with jQuery Form Plugin.
17
+ * Spam filtering with Akismet.
18
+
19
+ #### Localization Included
20
+
21
+ Thank you for your contribution.
22
+
23
+ * Italian, by [Bruno](http://www.brunosalzano.com)
24
+ * Japanese, by [Takayuki Miyoshi](http://ideasilo.wordpress.com) (plugin author)
25
+
26
+ If you have translated Contact Form 7 in your language, please let me know and send me [gettext .po and .mo files](http://codex.wordpress.org/Translating_WordPress).
27
 
28
  == Installation ==
29
 
admin-stylesheet.css CHANGED
@@ -41,6 +41,9 @@ input.cfdelete:hover {
41
  p.important {
42
  color: #eba80e;
43
  }
 
 
 
44
  input#contact-form-anchor-text {
45
  margin-left: 1em;
46
  color: #333;
@@ -61,6 +64,9 @@ input.wide {
61
  textarea {
62
  width: 99%;
63
  }
 
 
 
64
  p.submit {
65
  margin: 0 24px;
66
  }
@@ -89,6 +95,10 @@ div#quick-panel input, div#quick-panel textarea {
89
  background: #fff;
90
  width: 200px;
91
  }
 
 
 
 
92
  div#quick-panel input.qp-button {
93
  background: #fff url( images/fade-butt.png ) repeat-x 0 -2px;
94
  margin: 3px 1px 2px;
@@ -97,6 +107,9 @@ div#quick-panel input.qp-button {
97
  div#quick-panel input.required {
98
  border: 1px solid #777;
99
  }
 
 
 
100
  div#quick-panel table th {
101
  text-align: right;
102
  padding-left: 1em;
41
  p.important {
42
  color: #eba80e;
43
  }
44
+ span.notice {
45
+ color: #ed2b68;
46
+ }
47
  input#contact-form-anchor-text {
48
  margin-left: 1em;
49
  color: #333;
64
  textarea {
65
  width: 99%;
66
  }
67
+ label.disabled {
68
+ color: #777;
69
+ }
70
  p.submit {
71
  margin: 0 24px;
72
  }
95
  background: #fff;
96
  width: 200px;
97
  }
98
+ div#quick-panel input.inline-opt {
99
+ width: 1em;
100
+ vertical-align: middle;
101
+ }
102
  div#quick-panel input.qp-button {
103
  background: #fff url( images/fade-butt.png ) repeat-x 0 -2px;
104
  margin: 3px 1px 2px;
107
  div#quick-panel input.required {
108
  border: 1px solid #777;
109
  }
110
+ div#quick-panel table tr {
111
+ vertical-align: top;
112
+ }
113
  div#quick-panel table th {
114
  text-align: right;
115
  padding-left: 1em;
includes/admin-panel.php CHANGED
@@ -67,6 +67,16 @@
67
  <div class="fieldset"><div class="legend"><?php _e('Options', 'wpcf7'); ?></div>
68
  <label for="wpcf7-options-recipient"><?php _e('Recipient address:', 'wpcf7'); ?></label><br />
69
  <input type="text" id="wpcf7-options-recipient" name="wpcf7-options-recipient" class="wide" size="70" value="<?php echo htmlspecialchars($cf['options']['recipient']); ?>" />
 
 
 
 
 
 
 
 
 
 
70
  </div>
71
 
72
  <p class="submit">
@@ -128,24 +138,42 @@
128
  case 'text*':
129
  case 'email':
130
  case 'email*':
 
 
 
 
 
 
 
 
131
  quick_panel.innerHTML += '<table><tbody>'
132
  + '<tr><th>name=</th><td><input type="text" name="qp-name" id="qp-name" class="required" value="edit-me" onchange="wpcf7CreateTag();" /></td></tr>'
133
  + '<tr><th>size=</th><td><input type="text" name="qp-size" onchange="wpcf7CreateTag();" /></td>'
134
  + '<th>maxlength=</th><td><input type="text" name="qp-maxlength" onchange="wpcf7CreateTag();" /></td></tr>'
135
  + '<tr><th>id=</th><td><input type="text" name="qp-id" onchange="wpcf7CreateTag();" /></td>'
136
  + '<th>class=</th><td><input type="text" name="qp-class" onchange="wpcf7CreateTag();" /></td></tr>'
137
- + '<tr><th><?php _e('Default value', 'wpcf7'); ?></th><td><input type="text" name="qp-default" onchange="wpcf7CreateTag();" /></td></tr>'
 
 
138
  + '</tbody></table>';
139
  break;
140
  case 'textarea':
141
  case 'textarea*':
 
 
 
 
 
 
142
  quick_panel.innerHTML += '<table><tbody>'
143
  + '<tr><th>name=</th><td><input type="text" name="qp-name" id="qp-name" class="required" value="edit-me" onchange="wpcf7CreateTag();" /></td></tr>'
144
  + '<tr><th>cols=</th><td><input type="text" name="qp-cols" onchange="wpcf7CreateTag();" /></td>'
145
  + '<th>rows=</th><td><input type="text" name="qp-rows" onchange="wpcf7CreateTag();" /></td></tr>'
146
  + '<tr><th>id=</th><td><input type="text" name="qp-id" onchange="wpcf7CreateTag();" /></td>'
147
  + '<th>class=</th><td><input type="text" name="qp-class" onchange="wpcf7CreateTag();" /></td></tr>'
148
- + '<tr><th><?php _e('Default value', 'wpcf7'); ?></th><td><input type="text" name="qp-default" onchange="wpcf7CreateTag();" /></td></tr>'
 
 
149
  + '</tbody></table>';
150
  break;
151
  case 'select':
@@ -260,6 +288,30 @@
260
  }
261
  }
262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  var default_value = form.elements['qp-default'];
264
  if (default_value && '' != default_value.value) {
265
  var default_values = default_value.value.split("\n");
67
  <div class="fieldset"><div class="legend"><?php _e('Options', 'wpcf7'); ?></div>
68
  <label for="wpcf7-options-recipient"><?php _e('Recipient address:', 'wpcf7'); ?></label><br />
69
  <input type="text" id="wpcf7-options-recipient" name="wpcf7-options-recipient" class="wide" size="70" value="<?php echo htmlspecialchars($cf['options']['recipient']); ?>" />
70
+ <?php if (function_exists('akismet_http_post') && (get_option('wordpress_api_key') || $wpcom_api_key)) : ?>
71
+ <br /><br /><?php $checked = ($cf['options']['akismet']) ? ' checked="checked"' : ''; ?>
72
+ <input type="checkbox" id="wpcf7-options-akismet" name="wpcf7-options-akismet" value="1"<?php echo $checked; ?> />
73
+ <label for="wpcf7-options-akismet"><?php _e('Apply Akismet spam filter', 'wpcf7'); ?></label>
74
+ <?php else : ?>
75
+ <br /><br />
76
+ <input type="checkbox" id="wpcf7-options-akismet" name="wpcf7-options-akismet" value="1" disabled="disabled" />
77
+ <label for="wpcf7-options-akismet" class="disabled"><?php _e('Apply Akismet spam filter', 'wpcf7'); ?></label>
78
+ <br /><span class="notice"><?php _e('Akismet plugin is not active. You need Akismet to use this feature.', 'wpcf7'); ?></span>
79
+ <?php endif; ?>
80
  </div>
81
 
82
  <p class="submit">
138
  case 'text*':
139
  case 'email':
140
  case 'email*':
141
+ var akismet_option = '';
142
+ if (document.getElementById('wpcf7-admin-form-element').elements['wpcf7-options-akismet'].checked) {
143
+ akismet_option = '<th><?php _e('Akismet', 'wpcf7'); ?></th><td>'
144
+ + '<input type="radio" name="qp-akismet" onchange="wpcf7CreateTag();" value="author" class="inline-opt" /> <?php _e("Check this field as sender&#39;s name", 'wpcf7'); ?><br />'
145
+ + '<input type="radio" name="qp-akismet" onchange="wpcf7CreateTag();" value="author_email" class="inline-opt" /> <?php _e("Check this field as sender&#39;s email", 'wpcf7'); ?><br />'
146
+ + '<input type="radio" name="qp-akismet" onchange="wpcf7CreateTag();" value="author_url" class="inline-opt" /> <?php _e("Check this field as sender&#39;s URL", 'wpcf7'); ?><br />'
147
+ + '<input type="radio" name="qp-akismet" onchange="wpcf7CreateTag();" value="none" checked="checked" class="inline-opt" /> <?php _e("Don&#39;t check this field with Akismet", 'wpcf7'); ?></td>'
148
+ }
149
  quick_panel.innerHTML += '<table><tbody>'
150
  + '<tr><th>name=</th><td><input type="text" name="qp-name" id="qp-name" class="required" value="edit-me" onchange="wpcf7CreateTag();" /></td></tr>'
151
  + '<tr><th>size=</th><td><input type="text" name="qp-size" onchange="wpcf7CreateTag();" /></td>'
152
  + '<th>maxlength=</th><td><input type="text" name="qp-maxlength" onchange="wpcf7CreateTag();" /></td></tr>'
153
  + '<tr><th>id=</th><td><input type="text" name="qp-id" onchange="wpcf7CreateTag();" /></td>'
154
  + '<th>class=</th><td><input type="text" name="qp-class" onchange="wpcf7CreateTag();" /></td></tr>'
155
+ + '<tr><th><?php _e('Default value', 'wpcf7'); ?></th><td><input type="text" name="qp-default" onchange="wpcf7CreateTag();" /></td>'
156
+ + akismet_option
157
+ + '</tr>'
158
  + '</tbody></table>';
159
  break;
160
  case 'textarea':
161
  case 'textarea*':
162
+ var akismet_option = '';
163
+ if (document.getElementById('wpcf7-admin-form-element').elements['wpcf7-options-akismet'].checked) {
164
+ akismet_option = '<th><?php _e('Akismet', 'wpcf7'); ?></th><td>'
165
+ + '<input type="radio" name="qp-akismet" onchange="wpcf7CreateTag();" value="content" class="inline-opt" /> <?php _e("Check this field as content", 'wpcf7'); ?><br />'
166
+ + '<input type="radio" name="qp-akismet" onchange="wpcf7CreateTag();" value="none" checked="checked" class="inline-opt" /> <?php _e("Don&#39;t check this field with Akismet", 'wpcf7'); ?></td>'
167
+ }
168
  quick_panel.innerHTML += '<table><tbody>'
169
  + '<tr><th>name=</th><td><input type="text" name="qp-name" id="qp-name" class="required" value="edit-me" onchange="wpcf7CreateTag();" /></td></tr>'
170
  + '<tr><th>cols=</th><td><input type="text" name="qp-cols" onchange="wpcf7CreateTag();" /></td>'
171
  + '<th>rows=</th><td><input type="text" name="qp-rows" onchange="wpcf7CreateTag();" /></td></tr>'
172
  + '<tr><th>id=</th><td><input type="text" name="qp-id" onchange="wpcf7CreateTag();" /></td>'
173
  + '<th>class=</th><td><input type="text" name="qp-class" onchange="wpcf7CreateTag();" /></td></tr>'
174
+ + '<tr><th><?php _e('Default value', 'wpcf7'); ?></th><td><input type="text" name="qp-default" onchange="wpcf7CreateTag();" /></td>'
175
+ + akismet_option
176
+ + '</tr>'
177
  + '</tbody></table>';
178
  break;
179
  case 'select':
288
  }
289
  }
290
 
291
+ var akismet = form.elements['qp-akismet'];
292
+ if (akismet) {
293
+ for (var i = 0; i < akismet.length; i++) {
294
+ var ak = akismet[i];
295
+ if (ak.checked) {
296
+ switch (ak.value) {
297
+ case 'author':
298
+ tag += ' akismet:author';
299
+ break;
300
+ case 'author_email':
301
+ tag += ' akismet:author_email';
302
+ break;
303
+ case 'author_url':
304
+ tag += ' akismet:author_url';
305
+ break;
306
+ case 'content':
307
+ tag += ' akismet:content';
308
+ break;
309
+ }
310
+ break;
311
+ }
312
+ }
313
+ }
314
+
315
  var default_value = form.elements['qp-default'];
316
  if (default_value && '' != default_value.value) {
317
  var default_values = default_value.value.split("\n");
languages/wpcf7-it_IT.mo ADDED
Binary file
languages/wpcf7-it_IT.po ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WP Contact Form 7\n"
4
+ "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: 2007-09-05 16:04+0100\n"
6
+ "Last-Translator: Bruno Salzano <bruno@brunosalzano.com>\n"
7
+ "Language-Team: Takayuki Miyoshi <takayukister@gmail.com>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Poedit-Language: Japanese\n"
12
+ "X-Poedit-Country: JAPAN\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "X-Poedit-KeywordsList: __;_e\n"
15
+ "X-Poedit-Basepath: ../..\n"
16
+ "X-Poedit-SearchPath-0: contact-form-7\n"
17
+
18
+ #: contact-form-7/wp-contact-form-7.php:128
19
+ #: contact-form-7/wp-contact-form-7.php:201
20
+ msgid "Contact form"
21
+ msgstr "Modulo di contatto"
22
+
23
+ #: contact-form-7/wp-contact-form-7.php:157
24
+ #: contact-form-7/includes/admin-panel.php:5
25
+ msgid "Contact Form 7"
26
+ msgstr "Contact Form 7"
27
+
28
+ #: contact-form-7/wp-contact-form-7.php:177
29
+ #, php-format
30
+ msgid "Contact form \"%s\" deleted. "
31
+ msgstr "Il modulo di contatto \"%s\" è stato cancellato. "
32
+
33
+ #: contact-form-7/wp-contact-form-7.php:193
34
+ #, php-format
35
+ msgid "Contact form \"%s\" saved. "
36
+ msgstr "Il modulo di contatto \"%s\" è stato salvato. "
37
+
38
+ #: contact-form-7/wp-contact-form-7.php:222
39
+ msgid "Your Name"
40
+ msgstr "Il tuo nome"
41
+
42
+ #: contact-form-7/wp-contact-form-7.php:222
43
+ #: contact-form-7/wp-contact-form-7.php:224
44
+ msgid "(required)"
45
+ msgstr "(richiesto)"
46
+
47
+ #: contact-form-7/wp-contact-form-7.php:224
48
+ msgid "Your Email"
49
+ msgstr "La tua email"
50
+
51
+ #: contact-form-7/wp-contact-form-7.php:226
52
+ msgid "Subject"
53
+ msgstr "Oggetto"
54
+
55
+ #: contact-form-7/wp-contact-form-7.php:228
56
+ msgid "Your Message"
57
+ msgstr "Messaggio"
58
+
59
+ #: contact-form-7/wp-contact-form-7.php:230
60
+ #: contact-form-7/wp-contact-form-7.php:593
61
+ msgid "Send"
62
+ msgstr "Invia"
63
+
64
+ #: contact-form-7/wp-contact-form-7.php:249
65
+ msgid "Your message was sent successfully. Thanks."
66
+ msgstr "Il tuo messaggio è stato inviato. Grazie."
67
+
68
+ #: contact-form-7/wp-contact-form-7.php:251
69
+ msgid "Failed to send your message. Please try later or contact administrator by other way."
70
+ msgstr "Errore. Riprovare più tardi o contattare l'amministratore in altro modo."
71
+
72
+ #: contact-form-7/wp-contact-form-7.php:324
73
+ #: contact-form-7/wp-contact-form-7.php:424
74
+ msgid "Validation errors occurred. Please confirm the fields and submit it again."
75
+ msgstr "Sono avvenuti errori di validazione. Controllare i campi richiesti e inviare di nuovo il modulo."
76
+
77
+ #: contact-form-7/wp-contact-form-7.php:351
78
+ #: contact-form-7/wp-contact-form-7.php:358
79
+ #: contact-form-7/wp-contact-form-7.php:409
80
+ msgid "Please fill the required field."
81
+ msgstr "Per favore, riempire tutti i campi richiesti"
82
+
83
+ #: contact-form-7/wp-contact-form-7.php:361
84
+ #: contact-form-7/wp-contact-form-7.php:402
85
+ msgid "Email address seems invalid."
86
+ msgstr "Indirizzo email non valido."
87
+
88
+ #: contact-form-7/includes/admin-panel.php:19
89
+ #: contact-form-7/includes/admin-panel.php:22
90
+ msgid "Add new"
91
+ msgstr "Aggiungi nuovo"
92
+
93
+ #: contact-form-7/includes/admin-panel.php:34
94
+ msgid "Title"
95
+ msgstr "Titolo"
96
+
97
+ #: contact-form-7/includes/admin-panel.php:39
98
+ msgid "Copy and paste this code into your post content."
99
+ msgstr "Copia ed incolla questo codice nel contenuto del tuo post."
100
+
101
+ #: contact-form-7/includes/admin-panel.php:45
102
+ msgid "Form content"
103
+ msgstr "Contenuti del modulo"
104
+
105
+ #: contact-form-7/includes/admin-panel.php:58
106
+ msgid "Mail template"
107
+ msgstr "Template email"
108
+
109
+ #: contact-form-7/includes/admin-panel.php:59
110
+ msgid "Subject field:"
111
+ msgstr "Campo oggetto:"
112
+
113
+ #: contact-form-7/includes/admin-panel.php:61
114
+ msgid "Sender field:"
115
+ msgstr "Campo mittente:"
116
+
117
+ #: contact-form-7/includes/admin-panel.php:63
118
+ msgid "Message body:"
119
+ msgstr "Campo testo:"
120
+
121
+ #: contact-form-7/includes/admin-panel.php:67
122
+ msgid "Options"
123
+ msgstr "Opzioni"
124
+
125
+ #: contact-form-7/includes/admin-panel.php:68
126
+ msgid "Recipient address:"
127
+ msgstr "Indirizzo destinatario:"
128
+
129
+ #: contact-form-7/includes/admin-panel.php:73
130
+ msgid "Save"
131
+ msgstr "Salva"
132
+
133
+ #: contact-form-7/includes/admin-panel.php:80
134
+ msgid "Delete this contact form"
135
+ msgstr "Cancella questa form di contatto"
136
+
137
+ #: contact-form-7/includes/admin-panel.php:81
138
+ msgid ""
139
+ "You are about to delete this contact form.\n"
140
+ " 'Cancel' to stop, 'OK' to delete."
141
+ msgstr ""
142
+ "Stai per cancellare questa form di contatto.\n"
143
+ " 'Cancel' per annullare, 'OK' per confermare."
144
+
145
+ #: contact-form-7/includes/admin-panel.php:137
146
+ #: contact-form-7/includes/admin-panel.php:148
147
+ msgid "Default value"
148
+ msgstr "Valore di default"
149
+
150
+ #: contact-form-7/includes/admin-panel.php:156
151
+ msgid "Choices"
152
+ msgstr "Opzioni"
153
+
154
+ #: contact-form-7/includes/admin-panel.php:157
155
+ msgid "* One choice per line."
156
+ msgstr "* Una opzione per riga"
157
+
158
+ #: contact-form-7/includes/admin-panel.php:162
159
+ msgid "Label"
160
+ msgstr "Etichetta"
161
+
162
+ #: contact-form-7/includes/admin-panel.php:169
163
+ msgid "Insert"
164
+ msgstr "Inserisci"
165
+
languages/wpcf7-ja.mo CHANGED
Binary file
languages/wpcf7-ja.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Contact Form 7\n"
4
  "POT-Creation-Date: \n"
5
- "PO-Revision-Date: 2007-08-25 23:33+0900\n"
6
  "Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
7
  "Language-Team: Takayuki Miyoshi <takayukister@gmail.com>\n"
8
  "MIME-Version: 1.0\n"
@@ -15,73 +15,73 @@ msgstr ""
15
  "X-Poedit-Basepath: ../..\n"
16
  "X-Poedit-SearchPath-0: contact-form-7\n"
17
 
18
- #: contact-form-7/wp-contact-form-7.php:128
19
- #: contact-form-7/wp-contact-form-7.php:201
20
  msgid "Contact form"
21
  msgstr "コンタクトフォーム"
22
 
23
- #: contact-form-7/wp-contact-form-7.php:157
24
  #: contact-form-7/includes/admin-panel.php:5
25
  msgid "Contact Form 7"
26
  msgstr "Contact Form 7"
27
 
28
- #: contact-form-7/wp-contact-form-7.php:177
29
  #, php-format
30
  msgid "Contact form \"%s\" deleted. "
31
  msgstr "コンタクトフォーム \"%s\" が削除されました。"
32
 
33
- #: contact-form-7/wp-contact-form-7.php:193
34
  #, php-format
35
  msgid "Contact form \"%s\" saved. "
36
  msgstr "コンタクトフォーム \"%s\" が保存されました。"
37
 
38
- #: contact-form-7/wp-contact-form-7.php:222
39
  msgid "Your Name"
40
  msgstr "お名前"
41
 
42
- #: contact-form-7/wp-contact-form-7.php:222
43
- #: contact-form-7/wp-contact-form-7.php:224
44
  msgid "(required)"
45
  msgstr "(必須)"
46
 
47
- #: contact-form-7/wp-contact-form-7.php:224
48
  msgid "Your Email"
49
  msgstr "メールアドレス"
50
 
51
- #: contact-form-7/wp-contact-form-7.php:226
52
  msgid "Subject"
53
  msgstr "題名"
54
 
55
- #: contact-form-7/wp-contact-form-7.php:228
56
  msgid "Your Message"
57
  msgstr "メッセージ本文"
58
 
59
- #: contact-form-7/wp-contact-form-7.php:230
60
- #: contact-form-7/wp-contact-form-7.php:593
61
  msgid "Send"
62
  msgstr "送信"
63
 
64
- #: contact-form-7/wp-contact-form-7.php:249
65
  msgid "Your message was sent successfully. Thanks."
66
  msgstr "あなたのメッセージは送信されました。ありがとうございました。"
67
 
68
- #: contact-form-7/wp-contact-form-7.php:251
69
  msgid "Failed to send your message. Please try later or contact administrator by other way."
70
  msgstr "メッセージの送信に失敗しました。間をおいてもう一度お試しいただくか、別の手段で管理者にお問い合わせ下さい。"
71
 
72
- #: contact-form-7/wp-contact-form-7.php:324
73
- #: contact-form-7/wp-contact-form-7.php:424
74
  msgid "Validation errors occurred. Please confirm the fields and submit it again."
75
  msgstr "入力内容に不備があります。確認してもう一度送信してください。"
76
 
77
- #: contact-form-7/wp-contact-form-7.php:351
78
- #: contact-form-7/wp-contact-form-7.php:358
79
- #: contact-form-7/wp-contact-form-7.php:409
80
  msgid "Please fill the required field."
81
  msgstr "必須項目に記入もれがあります。"
82
 
83
- #: contact-form-7/wp-contact-form-7.php:361
84
- #: contact-form-7/wp-contact-form-7.php:402
85
  msgid "Email address seems invalid."
86
  msgstr "メールアドレスの形式が正しくないようです。"
87
 
@@ -127,14 +127,23 @@ msgid "Recipient address:"
127
  msgstr "受信者アドレス:"
128
 
129
  #: contact-form-7/includes/admin-panel.php:73
 
 
 
 
 
 
 
 
 
130
  msgid "Save"
131
  msgstr "保存"
132
 
133
- #: contact-form-7/includes/admin-panel.php:80
134
  msgid "Delete this contact form"
135
  msgstr "このコンタクトフォームを削除"
136
 
137
- #: contact-form-7/includes/admin-panel.php:81
138
  msgid ""
139
  "You are about to delete this contact form.\n"
140
  " 'Cancel' to stop, 'OK' to delete."
@@ -142,24 +151,50 @@ msgstr ""
142
  "このコンタクトフォームを削除しようとしています。\n"
143
  " 'キャンセル' で中止、 'OK' で削除します。"
144
 
145
- #: contact-form-7/includes/admin-panel.php:137
146
- #: contact-form-7/includes/admin-panel.php:148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  msgid "Default value"
148
  msgstr "デフォルト値"
149
 
150
- #: contact-form-7/includes/admin-panel.php:156
 
 
 
 
151
  msgid "Choices"
152
  msgstr "選択項目"
153
 
154
- #: contact-form-7/includes/admin-panel.php:157
155
  msgid "* One choice per line."
156
  msgstr "* 1行ごとに分けて入力してください。"
157
 
158
- #: contact-form-7/includes/admin-panel.php:162
159
  msgid "Label"
160
  msgstr "ラベル"
161
 
162
- #: contact-form-7/includes/admin-panel.php:169
163
  msgid "Insert"
164
  msgstr "挿入"
165
 
2
  msgstr ""
3
  "Project-Id-Version: WP Contact Form 7\n"
4
  "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: 2007-09-07 13:01+0900\n"
6
  "Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
7
  "Language-Team: Takayuki Miyoshi <takayukister@gmail.com>\n"
8
  "MIME-Version: 1.0\n"
15
  "X-Poedit-Basepath: ../..\n"
16
  "X-Poedit-SearchPath-0: contact-form-7\n"
17
 
18
+ #: contact-form-7/wp-contact-form-7.php:184
19
+ #: contact-form-7/wp-contact-form-7.php:258
20
  msgid "Contact form"
21
  msgstr "コンタクトフォーム"
22
 
23
+ #: contact-form-7/wp-contact-form-7.php:213
24
  #: contact-form-7/includes/admin-panel.php:5
25
  msgid "Contact Form 7"
26
  msgstr "Contact Form 7"
27
 
28
+ #: contact-form-7/wp-contact-form-7.php:233
29
  #, php-format
30
  msgid "Contact form \"%s\" deleted. "
31
  msgstr "コンタクトフォーム \"%s\" が削除されました。"
32
 
33
+ #: contact-form-7/wp-contact-form-7.php:250
34
  #, php-format
35
  msgid "Contact form \"%s\" saved. "
36
  msgstr "コンタクトフォーム \"%s\" が保存されました。"
37
 
38
+ #: contact-form-7/wp-contact-form-7.php:279
39
  msgid "Your Name"
40
  msgstr "お名前"
41
 
42
+ #: contact-form-7/wp-contact-form-7.php:279
43
+ #: contact-form-7/wp-contact-form-7.php:281
44
  msgid "(required)"
45
  msgstr "(必須)"
46
 
47
+ #: contact-form-7/wp-contact-form-7.php:281
48
  msgid "Your Email"
49
  msgstr "メールアドレス"
50
 
51
+ #: contact-form-7/wp-contact-form-7.php:283
52
  msgid "Subject"
53
  msgstr "題名"
54
 
55
+ #: contact-form-7/wp-contact-form-7.php:285
56
  msgid "Your Message"
57
  msgstr "メッセージ本文"
58
 
59
+ #: contact-form-7/wp-contact-form-7.php:287
60
+ #: contact-form-7/wp-contact-form-7.php:660
61
  msgid "Send"
62
  msgstr "送信"
63
 
64
+ #: contact-form-7/wp-contact-form-7.php:306
65
  msgid "Your message was sent successfully. Thanks."
66
  msgstr "あなたのメッセージは送信されました。ありがとうございました。"
67
 
68
+ #: contact-form-7/wp-contact-form-7.php:308
69
  msgid "Failed to send your message. Please try later or contact administrator by other way."
70
  msgstr "メッセージの送信に失敗しました。間をおいてもう一度お試しいただくか、別の手段で管理者にお問い合わせ下さい。"
71
 
72
+ #: contact-form-7/wp-contact-form-7.php:385
73
+ #: contact-form-7/wp-contact-form-7.php:485
74
  msgid "Validation errors occurred. Please confirm the fields and submit it again."
75
  msgstr "入力内容に不備があります。確認してもう一度送信してください。"
76
 
77
+ #: contact-form-7/wp-contact-form-7.php:412
78
+ #: contact-form-7/wp-contact-form-7.php:419
79
+ #: contact-form-7/wp-contact-form-7.php:470
80
  msgid "Please fill the required field."
81
  msgstr "必須項目に記入もれがあります。"
82
 
83
+ #: contact-form-7/wp-contact-form-7.php:422
84
+ #: contact-form-7/wp-contact-form-7.php:463
85
  msgid "Email address seems invalid."
86
  msgstr "メールアドレスの形式が正しくないようです。"
87
 
127
  msgstr "受信者アドレス:"
128
 
129
  #: contact-form-7/includes/admin-panel.php:73
130
+ #: contact-form-7/includes/admin-panel.php:77
131
+ msgid "Apply Akismet spam filter"
132
+ msgstr "スパムフィルタ Akismet を適用する"
133
+
134
+ #: contact-form-7/includes/admin-panel.php:78
135
+ msgid "Akismet plugin is not active. You need Akismet to use this feature."
136
+ msgstr "Akismet プラグインが有効になっていません。この機能を使うには Akismet が必要です。"
137
+
138
+ #: contact-form-7/includes/admin-panel.php:83
139
  msgid "Save"
140
  msgstr "保存"
141
 
142
+ #: contact-form-7/includes/admin-panel.php:90
143
  msgid "Delete this contact form"
144
  msgstr "このコンタクトフォームを削除"
145
 
146
+ #: contact-form-7/includes/admin-panel.php:91
147
  msgid ""
148
  "You are about to delete this contact form.\n"
149
  " 'Cancel' to stop, 'OK' to delete."
151
  "このコンタクトフォームを削除しようとしています。\n"
152
  " 'キャンセル' で中止、 'OK' で削除します。"
153
 
154
+ #: contact-form-7/includes/admin-panel.php:143
155
+ #: contact-form-7/includes/admin-panel.php:164
156
+ msgid "Akismet"
157
+ msgstr "Akismet"
158
+
159
+ #: contact-form-7/includes/admin-panel.php:144
160
+ msgid "Check this field as sender&#39;s name"
161
+ msgstr "このフィールドを送信者の名前としてチェックする"
162
+
163
+ #: contact-form-7/includes/admin-panel.php:145
164
+ msgid "Check this field as sender&#39;s email"
165
+ msgstr "このフィールドを送信者のメールアドレスとしてチェックする"
166
+
167
+ #: contact-form-7/includes/admin-panel.php:146
168
+ msgid "Check this field as sender&#39;s URL"
169
+ msgstr "このフィールドを送信者の URL としてチェックする"
170
+
171
+ #: contact-form-7/includes/admin-panel.php:147
172
+ #: contact-form-7/includes/admin-panel.php:166
173
+ msgid "Don&#39;t check this field with Akismet"
174
+ msgstr "このフィールドは Akismet のチェックの対象としない"
175
+
176
+ #: contact-form-7/includes/admin-panel.php:155
177
+ #: contact-form-7/includes/admin-panel.php:174
178
  msgid "Default value"
179
  msgstr "デフォルト値"
180
 
181
+ #: contact-form-7/includes/admin-panel.php:165
182
+ msgid "Check this field as content"
183
+ msgstr "このフィールドを本文としてチェックする"
184
+
185
+ #: contact-form-7/includes/admin-panel.php:184
186
  msgid "Choices"
187
  msgstr "選択項目"
188
 
189
+ #: contact-form-7/includes/admin-panel.php:185
190
  msgid "* One choice per line."
191
  msgstr "* 1行ごとに分けて入力してください。"
192
 
193
+ #: contact-form-7/includes/admin-panel.php:190
194
  msgid "Label"
195
  msgstr "ラベル"
196
 
197
+ #: contact-form-7/includes/admin-panel.php:197
198
  msgid "Insert"
199
  msgstr "挿入"
200
 
stylesheet.css CHANGED
@@ -16,6 +16,10 @@ div.wpcf7-mail-sent-ng {
16
  border: 2px solid #ff0000;
17
  }
18
 
 
 
 
 
19
  div.wpcf7-validation-errors {
20
  border: 2px solid #f7e700;
21
  }
16
  border: 2px solid #ff0000;
17
  }
18
 
19
+ div.wpcf7-spam-blocked {
20
+ border: 2px solid #ffa500;
21
+ }
22
+
23
  div.wpcf7-validation-errors {
24
  border: 2px solid #f7e700;
25
  }
wp-contact-form-7.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Form 7
4
  Plugin URI: http://ideasilo.wordpress.com/2007/04/30/contact-form-7/
5
  Description: Just another contact form plugin. Simple but flexible.
6
  Author: Takayuki Miyoshi
7
- Version: 1.3.2
8
  Author URI: http://ideasilo.wordpress.com/
9
  */
10
 
@@ -37,7 +37,7 @@ class tam_contact_form_seven {
37
  add_action('admin_head', array(&$this, 'admin_page_stylesheet'));
38
  add_action('wp_head', array(&$this, 'wp_head'));
39
  add_action('wp_print_scripts', array(&$this, 'load_js'));
40
- add_action('init', array(&$this, 'ajax_json_echo'));
41
  add_filter('the_content', array(&$this, 'the_content_filter'), 9);
42
  remove_filter('the_content', 'wpautop');
43
  add_filter('the_content', array(&$this, 'wpautop_substitute'));
@@ -78,25 +78,30 @@ class tam_contact_form_seven {
78
 
79
  return $pee;
80
  }
 
 
 
 
 
81
 
82
  function ajax_json_echo() {
83
- if ('POST' == $_SERVER['REQUEST_METHOD'] && isset($_GET['wpcf7']) && 'json' == $_GET['wpcf7']) {
84
- if (isset($_POST['_wpcf7'])) {
85
- $id = (int) $_POST['_wpcf7'];
86
- $unit_tag = $_POST['_wpcf7_unit_tag'];
87
- $contact_forms = $this->contact_forms();
88
- if ($cf = $contact_forms[$id]) {
89
- $cf = stripslashes_deep($cf);
90
- $into = '#' . $unit_tag . ' div.wpcf7-response-output';
91
- if ($this->mail($cf)) {
92
- echo '{ mailSent: 1, message: "' . $this->message('mail_sent_ok') . '", into: "' . $into . '" }';
93
- } else {
94
- echo '{ mailSent: 0, message: "' . $this->message('mail_sent_ng') . '", into: "' . $into . '" }';
95
- }
96
  }
97
  }
98
- exit();
99
  }
 
100
  }
101
 
102
  function mail($contact_form) {
@@ -113,7 +118,59 @@ class tam_contact_form_seven {
113
  return false;
114
  }
115
  }
116
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  function set_initial() {
118
  $wpcf7 = get_option('wpcf7');
119
  if (! is_array($wpcf7))
@@ -184,9 +241,10 @@ class tam_contact_form_seven {
184
  $mail_sender = trim($_POST['wpcf7-mail-sender']);
185
  $mail_body = trim($_POST['wpcf7-mail-body']);
186
  $options_recipient = trim($_POST['wpcf7-options-recipient']);
 
187
 
188
  $mail = array('subject' => $mail_subject, 'sender' => $mail_sender, 'body' => $mail_body);
189
- $options = array('recipient' => $options_recipient);
190
 
191
  $contact_forms[$id] = compact('title', 'form', 'mail', 'options');
192
  $updated_message = sprintf(__('Contact form "%s" saved. ', 'wpcf7'), $contact_forms[$id]['title']);
@@ -265,7 +323,9 @@ class tam_contact_form_seven {
265
  $fes = $this->form_elements($cf['form'], false);
266
  $validation = $this->validate_form_elements($fes);
267
  if ($validation['valid']) {
268
- if ($this->mail($cf)) {
 
 
269
  $_POST['_wpcf7_mail_sent'] = array('id' => $id, 'ok' => true, 'message' => $this->message('mail_sent_ok'));
270
  } else {
271
  $_POST['_wpcf7_mail_sent'] = array('id' => $id, 'ok' => false, 'message' => $this->message('mail_sent_ng'));
@@ -312,10 +372,12 @@ class tam_contact_form_seven {
312
  if ($this->processing_unit_tag == $_POST['_wpcf7_unit_tag']) {
313
  if (isset($_POST['_wpcf7_mail_sent']) && $_POST['_wpcf7_mail_sent']['id'] == $id) {
314
  if ($_POST['_wpcf7_mail_sent']['ok']) {
315
- $clsss .= ' wpcf7-mail-sent-ok';
316
  $content = $_POST['_wpcf7_mail_sent']['message'];
317
  } else {
318
  $class .= ' wpcf7-mail-sent-ng';
 
 
319
  $content = $_POST['_wpcf7_mail_sent']['message'];
320
  }
321
  } elseif (isset($_POST['_wpcf7_validation_errors']) && $_POST['_wpcf7_validation_errors']['id'] == $id) {
@@ -439,6 +501,9 @@ function notValidTip(input, message) {
439
  jQuery(input).mouseover(function() {
440
  jQuery(input).siblings('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast');
441
  });
 
 
 
442
  }
443
 
444
  function processJson(data) {
@@ -449,11 +514,14 @@ function processJson(data) {
449
  } else {
450
  wpcf7ResponseOutput.addClass('wpcf7-mail-sent-ng');
451
  }
 
 
 
452
  wpcf7ResponseOutput.append(data.message).fadeIn('fast');
453
  }
454
 
455
  function clearResponseOutput() {
456
- jQuery('div.wpcf7-response-output').hide().empty().removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors');
457
  jQuery('span.wpcf7-not-valid-tip').remove();
458
  jQuery('img.ajax-loader').css({ visibility: 'hidden' });
459
  }
4
  Plugin URI: http://ideasilo.wordpress.com/2007/04/30/contact-form-7/
5
  Description: Just another contact form plugin. Simple but flexible.
6
  Author: Takayuki Miyoshi
7
+ Version: 1.4
8
  Author URI: http://ideasilo.wordpress.com/
9
  */
10
 
37
  add_action('admin_head', array(&$this, 'admin_page_stylesheet'));
38
  add_action('wp_head', array(&$this, 'wp_head'));
39
  add_action('wp_print_scripts', array(&$this, 'load_js'));
40
+ add_action('init', array(&$this, 'init_switch'));
41
  add_filter('the_content', array(&$this, 'the_content_filter'), 9);
42
  remove_filter('the_content', 'wpautop');
43
  add_filter('the_content', array(&$this, 'wpautop_substitute'));
78
 
79
  return $pee;
80
  }
81
+
82
+ function init_switch() {
83
+ if ('POST' == $_SERVER['REQUEST_METHOD'] && isset($_GET['wpcf7']) && 'json' == $_GET['wpcf7'])
84
+ $this->ajax_json_echo();
85
+ }
86
 
87
  function ajax_json_echo() {
88
+ if (isset($_POST['_wpcf7'])) {
89
+ $id = (int) $_POST['_wpcf7'];
90
+ $unit_tag = $_POST['_wpcf7_unit_tag'];
91
+ $contact_forms = $this->contact_forms();
92
+ if ($cf = $contact_forms[$id]) {
93
+ $cf = stripslashes_deep($cf);
94
+ $into = '#' . $unit_tag . ' div.wpcf7-response-output';
95
+ if ($cf['options']['akismet'] && $this->akismet($cf)) { // Spam!
96
+ echo '{ mailSent: 0, message: "' . $this->message('mail_sent_ng') . '", into: "' . $into . '", spam: 1 }';
97
+ } elseif ($this->mail($cf)) {
98
+ echo '{ mailSent: 1, message: "' . $this->message('mail_sent_ok') . '", into: "' . $into . '" }';
99
+ } else {
100
+ echo '{ mailSent: 0, message: "' . $this->message('mail_sent_ng') . '", into: "' . $into . '" }';
101
  }
102
  }
 
103
  }
104
+ exit();
105
  }
106
 
107
  function mail($contact_form) {
118
  return false;
119
  }
120
  }
121
+
122
+ function akismet($contact_form) {
123
+ global $akismet_api_host, $akismet_api_port;
124
+
125
+ if (! function_exists('akismet_http_post') || ! (get_option('wordpress_api_key') || $wpcom_api_key))
126
+ return false;
127
+
128
+ $author = $author_email = $author_url = $content = '';
129
+ $fes = $this->form_elements($contact_form['form'], false);
130
+ foreach ($fes as $fe) {
131
+ if (! is_array($fe['options'])) continue;
132
+
133
+ if (preg_grep('%^akismet:author$%', $fe['options']) && '' == $author)
134
+ $author = $_POST[$fe['name']];
135
+ if (preg_grep('%^akismet:author_email$%', $fe['options']) && '' == $author_email)
136
+ $author_email = $_POST[$fe['name']];
137
+ if (preg_grep('%^akismet:author_url$%', $fe['options']) && '' == $author_url)
138
+ $author_url = $_POST[$fe['name']];
139
+ if (preg_grep('%^akismet:content$%', $fe['options']) && '' == $content)
140
+ $content = $_POST[$fe['name']];
141
+ }
142
+
143
+ $c['blog'] = get_option('home');
144
+ $c['user_ip'] = preg_replace('/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR']);
145
+ $c['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
146
+ $c['referrer'] = $_SERVER['HTTP_REFERER'];
147
+ $c['comment_type'] = 'contactform7';
148
+ if ('' != $author)
149
+ $c['comment_author'] = $author;
150
+ if ('' != $author_email)
151
+ $c['comment_author_email'] = $author_email;
152
+ if ('' != $author_url)
153
+ $c['comment_author_url'] = $author_url;
154
+ if ('' != $content)
155
+ $c['comment_content'] = $content;
156
+
157
+ $ignore = array('HTTP_COOKIE');
158
+
159
+ foreach ($_SERVER as $key => $value)
160
+ if (! in_array($key, $ignore))
161
+ $c["$key"] = $value;
162
+
163
+ $query_string = '';
164
+ foreach ($c as $key => $data)
165
+ $query_string .= $key . '=' . urlencode(stripslashes($data)) . '&';
166
+
167
+ $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);
168
+ if ('true' == $response[1])
169
+ return true;
170
+ else
171
+ return false;
172
+ }
173
+
174
  function set_initial() {
175
  $wpcf7 = get_option('wpcf7');
176
  if (! is_array($wpcf7))
241
  $mail_sender = trim($_POST['wpcf7-mail-sender']);
242
  $mail_body = trim($_POST['wpcf7-mail-body']);
243
  $options_recipient = trim($_POST['wpcf7-options-recipient']);
244
+ $options_akismet = (bool) $_POST['wpcf7-options-akismet'];
245
 
246
  $mail = array('subject' => $mail_subject, 'sender' => $mail_sender, 'body' => $mail_body);
247
+ $options = array('recipient' => $options_recipient, 'akismet' => $options_akismet);
248
 
249
  $contact_forms[$id] = compact('title', 'form', 'mail', 'options');
250
  $updated_message = sprintf(__('Contact form "%s" saved. ', 'wpcf7'), $contact_forms[$id]['title']);
323
  $fes = $this->form_elements($cf['form'], false);
324
  $validation = $this->validate_form_elements($fes);
325
  if ($validation['valid']) {
326
+ if ($cf['options']['akismet'] && $this->akismet($cf)) { // Spam!
327
+ $_POST['_wpcf7_mail_sent'] = array('id' => $id, 'ok' => false, 'message' => $this->message('mail_sent_ng'), 'spam' => true);
328
+ } elseif ($this->mail($cf)) {
329
  $_POST['_wpcf7_mail_sent'] = array('id' => $id, 'ok' => true, 'message' => $this->message('mail_sent_ok'));
330
  } else {
331
  $_POST['_wpcf7_mail_sent'] = array('id' => $id, 'ok' => false, 'message' => $this->message('mail_sent_ng'));
372
  if ($this->processing_unit_tag == $_POST['_wpcf7_unit_tag']) {
373
  if (isset($_POST['_wpcf7_mail_sent']) && $_POST['_wpcf7_mail_sent']['id'] == $id) {
374
  if ($_POST['_wpcf7_mail_sent']['ok']) {
375
+ $class .= ' wpcf7-mail-sent-ok';
376
  $content = $_POST['_wpcf7_mail_sent']['message'];
377
  } else {
378
  $class .= ' wpcf7-mail-sent-ng';
379
+ if ($_POST['_wpcf7_mail_sent']['spam'])
380
+ $class .= ' wpcf7-spam-blocked';
381
  $content = $_POST['_wpcf7_mail_sent']['message'];
382
  }
383
  } elseif (isset($_POST['_wpcf7_validation_errors']) && $_POST['_wpcf7_validation_errors']['id'] == $id) {
501
  jQuery(input).mouseover(function() {
502
  jQuery(input).siblings('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast');
503
  });
504
+ jQuery(input).focus(function() {
505
+ jQuery(input).siblings('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast');
506
+ });
507
  }
508
 
509
  function processJson(data) {
514
  } else {
515
  wpcf7ResponseOutput.addClass('wpcf7-mail-sent-ng');
516
  }
517
+ if (1 == data.spam) {
518
+ wpcf7ResponseOutput.addClass('wpcf7-spam-blocked');
519
+ }
520
  wpcf7ResponseOutput.append(data.message).fadeIn('fast');
521
  }
522
 
523
  function clearResponseOutput() {
524
+ jQuery('div.wpcf7-response-output').hide().empty().removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked');
525
  jQuery('span.wpcf7-not-valid-tip').remove();
526
  jQuery('img.ajax-loader').css({ visibility: 'hidden' });
527
  }