Hi,
I am very new to SilverStripe. I am reading the book about it but as I expected things have changed a lot since it was published.
I am at the stage of trying the comment module but as my site is hosted on a shared account, I cannot make use of composer.
I could do on a local site I have on my computer but my concern is to learn how to install it on line thus I try without composer.
Hereafter is what I did:
a) I downloaded the zip package and unzipped it locally. Then I put it on my local site's root renaming it "comments".
b) I visited the http://localhost/devbuild page and had the database updated apparently correctly.
c) I added this in mysite/_config.php
// Adds commenting to the class SiteTree (all Pages)
Commenting::add('SiteTree', array(
'require_login' => false, // boolean, whether a user needs to login
'required_permission' => false, // required permission to comment (or array of permissions)
'include_js' => true, // Enhance operation by ajax behaviour on moderation links
'show_comments_when_disabled' => false, // when comments are disabled should we show older comments (if available)
'order_comments_by' => "\"Created\" DESC",
'comments_per_page' => 10,
'comments_holder_id' => "comments-holder", // id for the comments holder
'comment_permalink_prefix' => "comment-", // id prefix for each comment. If needed make this different
'require_moderation' => false,
'html_allowed' => false, // allow for sanitized HTML in comments
'html_allowed_elements' => array('a', 'img', 'i', 'b'),
'use_preview' => false, // preview formatted comment (when allowing HTML). Requires include_js=true
'use_gravatar' => false,
'gravatar_size' => 80
));
Note: I also tried with Commenting::add('SiteTree');
d) I checked as said in the installation guide that I had $CommentForm in the Page.ss in (was not here but I added it after $PageComments) and visited http:localhost/admin/?flush=1
Results
I the pararmeter tab in CMS i have a new checkbox labelled "Allow comments"
If I let it unchecked no problem but if I check it, when I visit the page I get a server internal error.
Thank you in advance for help.
José