Configuration
eZ Comments provides some configurations to customize comment sorting, the number of comments per page, the notification format, etc. All of these settings are defined in settings/ezcomments.ini.append.php. For the full settings description please read Appendix A.
Set comment sort
You can change the sort order of comments in the content view, which has comments embedded, or in the comment view, which lists all the comment in a separate page.
In the content view, the default setting is that comments are sorted chronologically by the commenting time in descending order. To change the sorting, you can override settings/ezcomments.ini.append.php as follows:
[GlobalSettings] DefaultEmbededSortField=created DefaultEmbededSortOrder=asc
The the oldest comments will now be shown first in the content view.
Similarly, in the comment view, to change the sorting to update time in descending order you can override settings/ezcomments.ini.append.php as follows:
[CommentSettings] DefaultSortField=modified DefaultSortOrder=desc
Set number of comment shown in content
You can define how many comments are shown in the content by overriding settings/ezcomments.ini.append.php like this:
[GlobalSettings] DefaultEmbededCount=15
This will display the 15 latest or oldest comments, depending on the sort setting defined in the content view (see 4.1 Set comment sort)
Hide comment fields
By default, eZ Comments has some predefined fields in the comment form such as title, name, website, email, content. But often, you don't need this many fields. To hide fields, remove the unnecessary fields in settings/ezcomments.ini.append.php:
[FormSettings] AvailableFields[]=title AvailableFields[]=name AvailableFields[]=website AvailableFields[]=email AvailableFields[]=comment AvailableFields[]=notificationField
Afterwards, the removed field will not be shown in the comment form. But note that the field comment (comment content) can not be deleted.
Note: if email is removed but notificationField is kept, the anonymous user will not able to subscribe to comment updates when he/she comments. But a user who logged in can subscribe comment update using his/her registration email. In this case, editor can not update commentor's notification in comment editing page.
Configure activation settings
When an anonymous user comments on content with notification, the user should activate the subscription in order to receive a confirmation email. In addition, the activation link should expire after some time. You can configure the settings in settings/ezcomments.ini.append.php to enable the activation and set expiry time.
Enable activation
To disable the activation feature change the setting like this:
SubscriptionActivated=false
If the activation is disabled, the user can subscribe to comment updates without confirming his/her email address, although this is usually not considered safe or recommended.
Set expiry time
If a user does not activate the subscription in a set period of time, the activation should not remain valid. You can set expiry time by changing the setting like this
DaysToCleanupSubscription=20
In this example the activation will expire after 20 days.
Configure Notification email settings
When there is a new comment on a content, the user who has subscribed to the comment update should receive a notification. A typical setting for the notification is shown here:
Email from: To change the 'from' in the notification email, you can override ezcomment.ini.append.php like this:
MailFrom=noreply@yourdomain.com
Multi-comment updates in one email: Some users don't want to receive an email every time a new comment is posted. You can easily configure the settings to avoid this:
CommentsInOne=true
When the value is set to true, the system will send a notification with all the updated comments inside.
Note: to ensure this setting makes sense, we suggest you set the eZ Comments cronjob to run infrequently, for example every day at 7:00 am. Otherwise the subscribers will still receive notification every 5 minutes according to the setup setting. The infrequent cronjob setting might be like
0 7 * * * cd $EZPUBLISHROOT && $PHP runcronjobs.php -q ezcomments 2>&1
Or you can just specify ezcomments cronjob to be infrequent by changing extension/ezcomments/settings/cronjobini.append.php to be:
[CronjobSettings] ExtensionDirectories[]=ezcomments [CronjobPart-infrequent] Scripts[]=ezcomcleanupsubscription.php Scripts[]=ezcomhandlenotification.php
Disable/enable captcha
In eZ Comments, captcha is treated as a special field, like other fields. To disable captcha, you just need to remove or comment out the captcha field in "settings/ezcomments.ini.append.php" like this:
[FormSettings] ... #Comment out the next line if you want to disable the captcha feature #AvailableFields[]=recaptcha
By contrary, removing the # before AvailableFields[]=recaptcha will enable captcha.
Bypass captcha for special role
For some roles, such as "Editor", there is no need to use captcha. Please see setup permission for bypassing captcha as documented in the User Guide.
Geir Arne Waaler (18/03/2010 10:25 am)
Geir Arne Waaler (17/06/2010 11:59 am)
Comments
There are no comments.