Contact Form 7 1.7.7

April 7, 2008

Contact Form 7 / Download

I released Contact Form 7 1.7.7. This release contains new tag types for required checkboxes and drop-down menus. Checkbox* and Select* are newly introduced in this release. And Danish, Latvian and Swedish translations have been added.

New tag types: checkbox* and select*

As text*, email* and textarea* in the past, checkbox* and select* are required fields. The sender must check or select at least one meaningful option for each of these.

New translations

Contact Form 7 has now been translated into 17 languages. I’d like to genuinely thank all the translators!
Read the rest of this entry »

English version

  1. Contact Form 7 の管理ページはどこにありますか?
  2. 投稿の内容にコンタクトフォームを追加するにはどうすればよいですか?
  3. コンタクトフォームに項目を追加するにはどうすればよいですか?
  4. フォームにタグを追加したのにメールには何も表示されません。どうすれば追加した項目の入力内容をメールに取り込めますか?
  5. メールに [foobar] のような変なコードが入っているのですが、これは何ですか? 入れて欲しいのはユーザーの入力内容なんですが。
  6. メールの件名を指定することはできますか?
  7. 投稿内容以外の場所にコンタクトフォームを配置することはできますか?
  8. テンプレートファイルにコンタクトフォームを埋め込むことはできますか?
  9. フォームを送信すると「メッセージの送信に失敗しました」というエラーメッセージが表示されます。何が悪いのですか?
  10. フォームの送信後、回転する矢印のアイコンは現れるのですが、それっきりで何も起きません。
  11. 一部のブラウザ上でコンタクトフォームの動作がおかしくなります。
  12. コンタクトフォームを英語ではなく自国語で使いたいのですが。
  13. CAPTCHA が機能しません。画像が表示されないのです。
  14. CAPTCHA のテキスト入力項目が Internet Explorer では動くのに、Firefox では正しく機能しません。入力項目にコードを入力できません。

Read the rest of this entry »

Contact Form 7 FAQ

March 29, 2008

Contact Form 7 1.7.6

March 2, 2008

Contact Form 7 / Download

Acceptance type of form tag newly added. Got more HTML-valid a bit.

New tag type: acceptance

A tag with acceptance type generates a checkbox with some JavaScript gimmick. You can use it as a test confirming if the sender has accepted specific terms.

Example

[acceptance foo] Check this if you want to send.

By default, submit buttons in the form are enabled when the acceptance checkbox is checked.

acceptance-1.png

Disabled when not checked.

acceptance-2.png

With invert option, this rule is inverted. Submit buttons are enabled when you uncheck it and disalbed when you check it.

Example

[acceptance bar invert] Uncheck this if you want to send.

You can use multiple acceptances in the same form.

acceptance-3.png

More valid

I fixed some HTML-invalid codes.

  • Add alt attribute to <img />
  • Add cols and rows attribute to <textarea>
  • Add size attribute to <input type="text" />

The last one is not for HTML-valid, it’s for users who claims default size of text input field is too small. The default size now is 40, in most of browsers it’s larger than before.

If you still have HTML-invalid codes not yet fixed, please let me know.
Read the rest of this entry »

TinyMCE x WordPress Translation Sharing (txwts) is a WordPress plugin for translators who are localizing WordPress 2.5 beta right now. It allows you to import TinyMCE 3.x language package into WordPress PO file.

WordPress 2.5 newly allows gettext based localization for TinyMCE. TinyMCE has so many texts needed to be translated. With this plugin, you can reduce the work and share the same translating style between WordPress and TinyMCE.

Install

Download zip file from here.

  1. Upload whole txwts folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the [Plugins] menu in WordPress

Usage

  1. Open admin panel [Manage] - [TxW]
  2. Choose a PO file you want to translate (e.g. ja.po) from your PC
  3. Select your locale (e.g. Japanese)
  4. Enter [Translate] button

Then you’ll get updated PO file, check carefully and commit it.

If you find bugs, please let me know :)

Update (2/28): “No fuzzy” option added. Check this option if you want to make entries translated by this plugin not “fuzzy”.

Contact Form 7 1.7.5

January 26, 2008

Contact Form 7 / Download

Two fixes and one enhancement. 1) The SEO issue reported by Dexter has been fixed (I believe). 2) For wpautop() haters, hook function adding logic changed. 3) New include_blank option added to form tag of drop-down menus.

SEO issue

Dexter and some people told me that there seems be a SEO issue in Contact Form 7.

The “?wpcf7=json” code is used by Contact Form 7 only in AJAX submitting (POST) process. I wonder why Google indexed such URLs even now. Anyway, I worked around the issue.

Now Contact Form 7 doesn’t use “?wpcf7=json”, so I believe that kind of problem is fixed. But Google’s existing indexes are still there, I can’t do anything for that.

If you hate wpautop()

wpautop() is a WordPress’s built-in filter which automatically surrounds a paragraph with <p></p> tag. It’s useful and I like it, while I know some users hate it.

Some users remove the filter by commenting out a line in wp-includes/default-filters.php like below.

//add_filter('the_content', 'wpautop');

# Well, this is just an example. I don’t suggest that.

But when you are using Contact Form 7, this hack doesn’t work.

wpautop() is clever, but it doesn’t correctly treat form control elements. See this ticket. It’s a big issue for Contact Form 7. So Contact Form 7 removes original wpautop() filter, and adds patched one.

Due to this, if you want to remove wpautop() filtering, you need to hack codes in Contact Form 7 so far. It was sometimes confusing for the anti-autop hackers who didn’t know Contact Form 7 is doing such replacing.

In this release, I changed the replacing logic. Now it replaces wpautop() only if original wpautop() is registered on the filters array. So if you hate wpautop(), you can remove it by just editting wp-includes/default-filters.php.

New include_blank option for drop-down menu

If include_blank option is set, drop-down menu inserts a blank item “—” into the top of it. So this tag

[select your-menu "---" "a" "b" "c"]

and this tag

[select your-menu include_blank "a" "b" "c"]

have the same semantics.

I recommend you to use this option because it seems that some browsers don’t submit first option’s value in a menu, even if they shows the first one as selected by default. See also the HTML spec.
Read the rest of this entry »

Learning WP_Query

January 22, 2008

# 書きかけ

WordPress のいわゆる「ループ」の実体である WP_Query クラスの扱いについてよく知ろう、という趣旨です。

クエリ変数のリストを書き込むと、WP_Query により生成される SQL リクエストとその結果、さらに各種 $is_* 変数の状態を見ることができる学習用プラグイン Learning WP_Query を作りました。

ダウンロード: こちら

使い方:

  1. zip を展開してlearning-wp-query フォルダごと wp-content/plugins ディレクトリへコピー、Learning WP_Query プラグインを有効化
  2. [Options] - [Learning WP_Query] に管理ページが追加されているのでそこに移動
  3. いろいろいじってボタンを押したりしていると要領がつかめると思います

Contact Form 7 tag syntax

January 4, 2008

This page explains the syntax of Contact Form 7’s tag. If you are not familiar with basic usage of Contact Form 7, please see the plugin’s homepage.

Contact Form 7 uses “tags” for two purposes; one is for form content and the other is for mail (to, from and subject fields and message body). Tags for form content has different syntax from ones for mail.

Example of a tag used in form content:
[email* your-email 60/200 "your-email@example.com"]

Example of a tag used in mail:
[your-email]

As seen in above examples, a tag for form content generally has more complicated syntax and many options. In the rest of this page, I write mainly about the syntax and options of form content tag.
Read the rest of this entry »

このページは Contact Form 7 プラグインの使い方について紹介しています。

デフォルト (英語) 設定の WordPress で使った場合、Contact Form 7 はそのメッセージを英語で表示します。

Contact Form 7 の英語メッセージ表示の例

このメッセージを日本語に変えたい場合、Contact Form 7 のソースコードに変更を加える必要はありません。Contact Form 7 には日本語の言語ファイルが同梱されているので、日本語設定の WordPress で使う場合には自動的に日本語でメッセージを表示するように作られています。

Contact Form 7 の日本語メッセージ表示の例

WordPress の言語を日本語に設定するには、WordPress のディレクトリにある wp-config.php を以下のように変更します。

define ('WPLANG', '');

define ('WPLANG', 'ja');

WordPress の日本語公式サイトで配布している日本語版 WordPress をインストールされている場合ははじめから上の設定が行われていますので、特に何も手を加えることなく日本語で使用できます。

もし、日本語の表現を自分の好みに合わせて変更したいと思ったなら、Contact Form 7 の日本語言語ファイルは contact-form-7/languages/wpcf7-ja.po にあるので、このファイルを poEdit などのツールを使用して編集して使ってください。

I released Contact Form 7 1.7.4. You can download it from WordPress.org’s repository.

In this version, I removed two tag types, select+ and checkbox+, because they were confusing. If you have been using those tags and checkbox, you’ll be needed to edit them manually after upgrading. I’m sorry for the inconvenience.

If you are using select+ tag, replace it with select and add multiple option. Here is an example:

Before: [select+ your-menu “ウインダム” “ミクラス” “アギラ”]

After: [select your-menu multiple “ウインダム” “ミクラス” “アギラ”]

If you are using checkbox+ tag, replace it with checkbox. Here is an example:

Before: [checkbox+ your-checkbox “ウインダム” “ミクラス” “アギラ”]

After: [checkbox your-checkbox “ウインダム” “ミクラス” “アギラ”]

If you are using checkbox tag (exclusive checkbox), add exclusive option. Here is an example:

Before: [checkbox your-checkbox “ウインダム” “ミクラス” “アギラ”]

After: [checkbox your-checkbox exclusive “ウインダム” “ミクラス” “アギラ”]
Read the rest of this entry »