Title: WP Inline Comment Errors
Author: aviarts
Published: <strong>2013 年 8 月 8 日</strong>
Last modified: 2014 年 5 月 12 日

---

搜索插件

![](https://ps.w.org/wp-inline-comment-errors/assets/banner-772x250.png?rev=754121)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/wp-inline-comment-errors_ffffff.svg)

# WP Inline Comment Errors

 作者：[aviarts](https://profiles.wordpress.org/aviarts/)

[下载](https://downloads.wordpress.org/plugin/wp-inline-comment-errors.1.1.zip)

 * [详情](https://cn.wordpress.org/plugins/wp-inline-comment-errors/#description)
 * [评价](https://cn.wordpress.org/plugins/wp-inline-comment-errors/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wp-inline-comment-errors/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wp-inline-comment-errors/#developers)

 [支持](https://wordpress.org/support/plugin/wp-inline-comment-errors/)

## 描述

The WP Inline Comment Errors plug-in enables WordPress to display comment form field
errors directly in the page or post that displays the comment form. You can add 
your own validation functions for author, email, url, comment and custom meta comment
form fields and customize the way the error messages or error indications appear.
This is a purely PHP solution that does not rely on JavaScript or redirecting the
browser to a error message page template.

Out of the box and without any configuration, the plug-in will display a list of
errors in between the title and first field of the comment form. The plug-in will
also show an asterisk as a required mark next to the label of the name, email and
comment fields and repost the comment form data for these fields. You can further
customize the behavior of the plug-in with the plug-in functions.

Visit the [WP Inline Comment Errors](http://www.aviarts.com/wp-inline-comment-errors-plug-in/)
for more information and documentation.

### Translations

 * English
 * Spanish [Andrew Kurtis WebHostingHub](http://www.webhostinghub.com/)
 * Chinese Taiwan

_Note:_ The plug-in is localized/ translateable by default. Please contribute your
language to the plugin to make it even more useful and I will add your translation
credit and a link to your web site on this page. Read the ‘translation-instructions.
rtf’ document in the plug-in files for detailed instructions on how to translate
this plug-in.

## 屏幕截图

[⌊Screen shot of WordPress default error message display.⌉⌊Screen shot of WordPress
default error message display.⌉[

Screen shot of WordPress default error message display.

[⌊Screen shot of the 'out of the box' comment error display for the WP Inline Comment
Errors plug-in.⌉⌊Screen shot of the 'out of the box' comment error display for the
WP Inline Comment Errors plug-in.⌉[

Screen shot of the ‘out of the box’ comment error display for the WP Inline Comment
Errors plug-in.

[⌊Screen shot of the settings page.⌉⌊Screen shot of the settings page.⌉[

Screen shot of the settings page.

## 安装

This section describes how to install the plugin and get it working. You can install
the plug-in using WordPress plug-ins page or you can manually install the plug in.

 1. Download the plug-in wp-inline-comment-errors.zip archive
 2. Unpack the wp-inline-comment-errors.zip archive
 3. Upload the folder named `wp-inline-comment-errors` to the `/wp-content/plugins/`
    directory
 4. Activate the plugin through the ‘Plugins’ menu in WordPress
 5. Review the plug-in Settings page to see how the plug-in is configured
 6. Review the plug-in documentation for more information on how to customize the plug-
    in

## 常见问题

  Do I need add any code to my site to make this plug-in work?

No. The out of the box install should automatically display a list any comment form
error messages in the post or page with the form.

  Can I change the way the plug-in displays error information?

Yes. The plug-in is very customizable. You can use plug-in functions to modify just
about any aspect of the display of errors. Note that you will need to at least be
familiar with coding cascading style sheets to make changes to the ‘out of the box’
error display. If you want to customize beyond that you will need to be familiar
with PHP and basic WordPress programing concepts. Please review the extensive plug-
in documentation at the plug-in page.

  Can I change the wording of the error messages?

Yes. You will need to add some code to your functions.php in order to set new wording
for the message. Furture version of the plug-in will allow you to set the message
wording in the plug-in settings page.

  Does this plug-in use Javascript AJAX to display errors?

No. This is a purely PHP based solution that prints errors back into the page or
post that someone is trying to post a comment to. While Javascript AJAX solutions
offer a convenient user experience, it is possible for a user to turn off Javascript
which will affect the way your web site displays comment form error messages.

  Why does this plug-in use PHP sessions?

PHP sessions are an idiomatic way to pass data between two different scripts. The
plug-in uses a session variable to pass error information and HTTP POST data from
the comment form back to the page or post that the user was commenting on. Normally
a user submits the comment form which passes data to the WordPress wp-comments-post.
php script. If there is an error the wp-comments-post.php script terminates and 
displays errors using WordPress’s default error display, which is an unformatted
page. The plug-in improves upon this behavior this by storing the error data and
form POST data in a session variable, redirecting the user back to the page or post
and printing POST data back into the form and printing the error information where
you specify.

  What happens if a user has disabled cookies and my server does not support GET
based sessions?

In the rare case where a user has their web browser set up to block all cookies 
and your server is set up to handle sessions with cookies only (ie sessions are 
disabled), then the plug-in will fall back to displaying error messages in an error
message template. You can provide your own customized template so the error messages
appear in a page formatted like your web site. If you do not provide a template 
then the plug-in will use the WordPress default error display to show any error 
messages. Review the documentation for tips on how to create an error message template.

  How do I know how my server supports sessions?

The plug-in settings page provides information about your PHP sessions settings 
and will advise you as to whether you should set up a error template or not.

## 评价

此插件暂无评价。

## 贡献者及开发者

「WP Inline Comment Errors」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ aviarts ](https://profiles.wordpress.org/aviarts/)

[帮助将「WP Inline Comment Errors」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-inline-comment-errors)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wp-inline-comment-errors/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/wp-inline-comment-errors/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/wp-inline-comment-errors/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wp-inline-comment-errors/)。

## 更新日志

#### 1.1

 * Corrected an issue where default error messages would not translate.
 * Corrected an issue where form field names were not displaying properly when WordPress
   is set to use Chinese language
 * Corrected an issue where plug-in incorrectly displayed name field error message
   for duplicate comment situation
 * Corrected an issue where custom messages set by wpice_set_messages configuration
   function would not display

#### 1.0

 * First release.

## 额外信息

 *  版本 **1.1**
 *  最后更新：**12 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.5.1 或更高版本 **
 *  已测试的最高版本为 **3.7.41**
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-inline-comment-errors/)
 * 标签
 * [comment fields](https://cn.wordpress.org/plugins/tags/comment-fields/)[comments](https://cn.wordpress.org/plugins/tags/comments/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-inline-comment-errors/advanced/)

## 评级

 4 星（最高 5 星）。

 *  [  0 条 5 星评价     ](https://wordpress.org/support/plugin/wp-inline-comment-errors/reviews/?filter=5)
 *  [  1 条 4 星评价     ](https://wordpress.org/support/plugin/wp-inline-comment-errors/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/wp-inline-comment-errors/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/wp-inline-comment-errors/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/wp-inline-comment-errors/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-inline-comment-errors/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp-inline-comment-errors/reviews/)

## 贡献者

 *   [ aviarts ](https://profiles.wordpress.org/aviarts/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/wp-inline-comment-errors/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.aviarts.com/wp-inline-comment-errors-plug-in/)