Contact Form 7 1.8

Contact Form 7 | Download

(日本語の説明は下にありますので転がして読んでください)

Contact Form 7 1.8 is now available at last! Please note that I’m also planning to release 1.8.1 next month, with even more functions.

The main changes of Contact Form 7 1.8 are below.

Control panel moved from Settings to Manage

This is an important change, particularly if you are a longtime user. In the past, the control panel of Contact Form 7 was in Settings > Contact Form 7. You will now find it in Manage > Contact Form 7.

In addition to this change, I extended the scope of authority to access the control panel. Administrators and editors can read and edit contact forms, while authors and contributors can read only the tag code for inserting into their posts. Whether this change is acceptable to all users is still up for debate, so your feedback would be much appreciated.

Should you find you don’t like the behavior, you can alter it by defining wpcf7_read_capability() and wpcf7_read_write_capability() in or outside the wp-contact-form-7.php. For example, with these codes you can put it back to the old way (only administrators can access the control panel):

function wpcf7_read_capability() { return 'manage_options'; }
function wpcf7_read_write_capability() { return 'manage_options'; }

WP_CONTENT_DIR, WP_CONTENT_URL and other constants

In WordPress 2.6, you can redefine the path of the directory of customizable contents, i.e. wp-content. If you haven't heard that, read this post from planetOzh. Contact Form 7 1.8 supports this feature by referring the new constants WP_CONTENT_DIR and WP_CONTENT_URL for getting paths. Backward compatibility is also considered.

In addition, it uses these constants:

  • WP_PLUGIN_DIR
  • WP_PLUGIN_URL
  • WPCF7_PLUGIN_DIR
  • WPCF7_PLUGIN_URL
  • WPCF7_CAPTCHA_TMP_DIR
  • WPCF7_CAPTCHA_TMP_URL

The WPCF7_* contents are Contact Form 7's original constants.

You decide paths as you wish by editing source codes and defining these constants.

Compatible with HTTPS

WordPress 2.6 includes better support for visiting the admin over HTTPS. Contact Form 7 1.8 has been updated to be able to work correctly when you are using this feature.

Moving CAPTCHA temporary image directory

In previous releases of Contact Form 7, temporary CAPTCHA images were generated in the directory wp-content/plugins/contact-form-7/captcha/tmp. However, putting the images inside the plugin's directory could cause trouble when the plugin auto-upgrading function of WordPresss runs (which resets the writing permission of the directory).

To prevent such troubles occurring, the CAPTCHA temporary image directory has been moved to outside the plugin's directory. Its new home is wp-contents/uploads/wpcf7_captcha.

In most cases that directory is writable, so you can use CAPTCHA without any concerns. If you don't like the path and want to change it, you can do it by redefining the constants WPCF7_CAPTCHA_TMP_DIR and WPCF7_CAPTCHA_TMP_URL. Don't forget to make the directory writable.

Adding id: and class: options to submit tag

This may sound like a trivial addition, but it is one many users have requested. There have always been id: and class: options for adding id and class attributes to the form control tags, but the submit tag has not had such options. These options have now, at last, been added to the submit tag in Contact Form 7 1.8.

New translation pack

A translation pack for Hungarian has been newly added. Our thanks must go to Andras Hirschler!

Plans for Contact Form 7 1.8.1

Version 1.8.1 of Contact Form 7 is in the pipeline to be released in September. The following features and improvements are likely to be a part of this version:

  • Importing and exporting of configurations;
  • Customizable messages;
  • More tags for forms and mail contents;
  • And more.


Contact Form 7 1.8 をようやくリリースすることができました!

コントロールパネルが 設定 から 管理 へ移動

これまで 設定 > Contact Form 7 にあったコントロールパネルは 管理 > Contact Form 7 に移動しているのでご注意ください。これに伴いアクセス権限の扱いも見直しています。管理者(Administrator) および編集者(Editor) にコンタクトフォームの編集権限が、作成者(Author) および投稿者(Contributor) に埋め込みタグコード表示のみの権限が与えられるようになっています。この変更は賛否の分かれるところかもしれませんのでご意見があれば歓迎します。

この動作が気に入らない場合は、関数 wpcf7_read_capability()wpcf7_read_write_capability() を定義しなおすことで変更も可能です。オリジナルは wp-contact-form-7.php で定義されていますがその外(例えば wp-config.php の中)で定義しても OK です。内容については、たとえば以下のようにすれば従来の権限の扱い(つまり管理者だけがアクセスできる状態)に戻すことができます。

function wpcf7_read_capability() { return 'manage_options'; }
function wpcf7_read_write_capability() { return 'manage_options'; }

WP_CONTENT_DIRWP_CONTENT_URL とその他の定数

WordPress 2.6 から従来の wp-content のパスをユーザーが自由に定義できるようになりました。Contact Form 7 1.8 ではこの変更をサポートするようになっています。

新たに以下の定数を使用するようになっていますので、変更したい場合は自由に再定義して使ってください。

  • WP_CONTENT_DIR
  • WP_CONTENT_URL
  • WP_PLUGIN_DIR
  • WP_PLUGIN_URL
  • WPCF7_PLUGIN_DIR
  • WPCF7_PLUGIN_URL
  • WPCF7_CAPTCHA_TMP_DIR
  • WPCF7_CAPTCHA_TMP_URL

HTTPS に対応

同様に WordPress 2.6 から管理画面の HTTPS 使用のサポートが加わりましたが、それにも対応できるようにしています。

CAPTCHA 画像置き場を移動

これまではテンポラリの CAPTCHA 画像を wp-content/plugins/contact-form-7/captcha/tmp の下に生成していましたが、プラグインのフォルダの中に置いていると WordPress がプラグインを自動アップグレードしようとしたときにフォルダのパーミッションがリセットされて面倒が起こることが多かったので、今後はプラグインフォルダの外に置くことにしました。

新しい置き場所は wp-contents/uploads/wpcf7_captcha で、ここは基本的に書き込み可能にされているはずなので、特に手間もなく CAPTCHA が使えると思います。この置き場所が気に入らない場合は WPCF7_CAPTCHA_TMP_DIRWPCF7_CAPTCHA_TMP_URL の定数で指定していますから好きなように変更してください。指定したフォルダを書き込み可能にしておくのをお忘れなく。

送信(submit)タグに id:class: のオプションを追加

非常に地味な変更ですがけっこう要望が多かったので。送信タグだけこれまでどういうわけか id:class: のオプションが使えませんでしたがこれからは他のタグ同様使えるようになります。

新しい言語パック

ハンガリー語の言語パックが追加同梱されました。作ってくれたのは Andras Hirschler さんです。どうもありがとう!

Contact Form 7 1.8.1 で予定している機能について

1.8 で積みきれなかった機能は 1.8.1 として9月に出します。おそらく次のような機能が追加されるでしょう。

  • コンタクトフォーム設定のインポート、エクスポート
  • メッセージがカスタマイズ可能に
  • フォームとメールで使えるタグをさらに追加
  • ほか多数

20 thoughts on “Contact Form 7 1.8

  1. Hi,

    I just automatically upgraded this plugin through WordPress 2.6. ‘Out of the box’ (as a result of auto upgrade) the new version resulted in blank captcha images, unsubmittable forms (because user can’t verify captcha image) and the following PHP warnings:

    PHP Warning: imagettftext() ['function.imagettftext']: Could not read font in /path/to/wordpress/wp-content/plugins/contact-form-7/captcha/captcha.php on line 60

    The problem is because of the FTP method used to transfer the new files being ASCII when it should be auto to cover the included font files that are binary. (I think that’s right!)

    To solve the problem I downloaded the original ZIP file myself and FTP uploaded the font files to wp-content/plugins/contact-form-7/captcha/gentium/.

    I would imagine this has been a problem in the past, but I’ve never auto upgraded before so this is the first time I noticed and so I thought I should leave this message.

    James

  2. I would personally never ever use Auto-upgrade and would welcome a plugin that would help disable the links on the plugin page.

  3. @flick – this is the first time I have experienced any issues as a result of auto upgrading. I personally think it is a great feature and can save a lot of time, particularly if you run several blogs that use the same plugins. It can be time consuming deactivating a plugin, uploading new files, removing old ones and then re-enabling. Multiply that by 3 or 4 installations and you could be in for some serious boredom!

    I’m not sure if a plugin to disable the auto upgrade links is really necessary (or possible, isn’t that sort of code built in to the core of WordPress?). If a blog owner is set on not wanting to use the auto upgrade feature, they should just remember not to click the link and then follow the prompts. :-)

  4. James, thank you for the good info. I’ll check it.

    If there are other guys who also have experienced the same issue, it would be helpful if you could tell me about your server environment. (the version of WordPress, server OS, PHP version, hosting service name, …)

  5. I love your contact form, it does almost exactly what I want it to, keep up the great work. There is one small feature that I would like to add in, but I am new to programing, so don’t know where to start. I would like when the form is submitted, the submitters IP address be included in the email. If you could give me a hint as to where to insert what code to get it to display, that would be awesome.

    Jay

  6. @James: Thanks for your reply :) After reading several threads involving problems with automatic upgrade on the WP forums, I’ve steered clear of even clicking on the links. I do agree with your point about it saving time though; I run around 3-4 site as well, and it is a bit of a hassle updating plugins for all, but I guess I’ll wait till this function is more stable before I start using it.

    p/s: I tend to accidentally click on links :p

  7. Hello miyoshi.

    I am interested in hiring you for a project that requires the modification of this plugin. Essentially, we need to be able to add upload fields for user created forms. On the user end, the user will see the upload form and select the browse button, select a file from the user’s computer, and when the user clicks the submit button, the file is uploaded to a destination on the server. The file can either be emailed directly to the website owner, or a download link would be sent. This feature appears to not be included in the current or next upcoming version of this plugin. If you are interested, I would like to start ASAP and would allow you to share the mod with the community.

    Thanks for your consideration.

  8. It would also be nice to add attachments, so the person filling out the contact form could send a picture or file using the browse button and sending it with the other info. This is a feature I’m looking forward to.

    Also maybe an auto update in the message portion as well. So as you add new fields to the contact form it adds them to the message as well.

    Just some ideas to help make it more user friendly, this is a great plug-in and I will continue to use it no matter what but those are some features I would like to see.

    Thanks.

  9. I tried the latest Contact Form 7– and it appeared to work well, but has a slight bug when used with the Simple:Press Forum plug-in. For some reason, the icons in the Forum “stairstep” instead of lining-up when your plug-in is activated. I’ll try it again when 1.8.1 is out.

  10. Well done on this awesome plugin, as it is a really helpful. One suggestion along with @Jay would be to include IP address information on forwarded emails. Other than that, I think its perfect

    Cheers,
    Tony

  11. Hi miyoshi!
    i’ve got a problem with the captcha:
    Fatal error: Call to undefined function: imagettftext() in /home/quintana/domains/raulquintana.es/public_html/wp-content/plugins/contact-form-7/captcha/captcha.php on line 60

    http://www.raulquintana.es/contacto/

    i’ve downloaded it from wordpress.org and is the version: 1.8

    what can i do?
    Tnx!

  12. savemich, thanks for the comment. I have a plan for adding file uploading field, but it’s going to be a long time. About auto-updating of the message portion, it’s a good idea I think while I worry that it might be confusing for users. Thank you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s