Setup
Get the packages
As of eZ Publish Enterprise 4.7 and eZ Publish Community Edition 2012.04, if you install the demo design package, setup is already done for you and you can skip to the step concerning cronjobs.
If you have a eZ Publish Enterprise, you'll be able to download a supported stable version for your eZ Publish Enterprise version from your service portal on support.ez.no, as for community version it is bundled but also available via github.
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.
André R. (27/03/2012 11:27 am)
André R. (27/03/2012 11:39 am)
Comments
There are no comments.