Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Setup

Get the packages

You can download the package from eZ Publish download page

Copy the extension

After downloading the source code of eZ Comments (folder named ezcomments), you must copy ezcomments into your eZ Publish extension directory.

Install database

Because eZ Comments uses custom tables, you must create the tables separately. Currently supported databases are "Mysql", "PostgreSQL" and "Oracle". You can execute the sql file in

ezcomments/sql/databasetype/schema.sql

The example command line in mysql is

$ mysql --host=<mysql_host> --port=<port> -u  <mysql_user> -p<mysql_password> <database> <  extension/ezcomments/sql/mysql/schema.sql

Activate eZ Comments

As with other common extensions, the extension can be activated both from the Administrator Interface and the setting file. Using the first way, you must log in to the Administrator Interface, click the Setup tab, then open the Extensions link in the left hand menu. A list will appear with all the Available extensions, where you must check the ezcomments box to select the extension. The click the button Apply Changes to activate the extension.

If you prefer to use the second way, open settings/override/site.ini.append.php and add the activation configuration under the "ExtensionSettings" section like this:

[ExtensionSettings]
ActiveExtensions[]=ezcomments

 

Note: ezcomments should be before ezwebin in site.ini.

Regenerate autoload arrays

After activating eZ Comments, it is necessary to regenerate the autoload arrays. This can be done from the Administrator Interface after you have activated the extension as described in the previous step. When you have applied the changes simply click on the Regenerate autoload arrays for extensions.

You can also generate the autoload arrays by running the following script from your eZ Publish directory:

php bin/php/ezpgenerateautoloads.php -e

Clear cache

Don't forget to clear the cache. You can clear INI and template caches from the Setup tab in the Administrator Interface or by running the following command from your eZ Publish directory:

php bin/php/ezcache.php --ini --template

Setup cronjob

eZ Comment uses a cronjob to send notifications. If the cronjob is not running, the notification system will not work but the notifications will remain in queue until cronjob is running.
If you do wish to configure and run a cronjob for eZ Publish, you can do this by following the steps in the chapter Cronjobs

A simple setting for eZ Comments is to add this line into ezpublish.cron:

*/5 * * * * cd $EZPUBLISHROOT && $PHP runcronjobs.php -q  ezcomments 2>&1

which will send notification every 5 minutes. There is an advanced setting, which can be found in next chapter Configuration/Configure Notification email settings.

Note: if you want to send notification in other language instead of default language, you can specify different site access. For instance, configuration

*/5 * * * * cd $EZPUBLISHROOT && $PHP runcronjobs.php -s ger -q  ezcomments 2>&1

will send notification based on locale in site access ger where German might be the main language.

Default permission Setup

There is an example in user manual describing how to set permission. Please see Setting access and restriction policies in user manual for detail.

Geir Arne Waaler (17/06/2010 11:11 am)

Geir Arne Waaler (17/06/2010 11:11 am)


Comments

There are no comments.