How to Install and use Page Comments Plugin for Umbraco
We recently launched the first-of-its-kind Page Comments Plugin that allows comments on any of the webpages or blogs of your website without the security risk of third party vendors. This easy-to-use tool also lets you moderate and manage all online comments to your website – giving you the power to delete, flag, approve, disapprove as well as auto-approve comments at one go as bulk.
Download this easy and useful plugin we’ve developed from here. Follow the simple instructions below and you’ll be all set to manage the internet’s never ending discussions without compromising any user information.
- If you haven’t already, download our plugin, right now!
- Log in to Umbraco’s back office
Click on the 'Developer' menu, then choose 'Install local package' as shown in the screen shot below.
- Tick the check box to agreeing risks associated with local packages
Browse the package .zip file and click on the 'load package' button as shown in screen shot below
- Tick on ‘Accept License’ and click on 'Install Package' button as shown in screen shot below.
- Wait till package is installed. Do not refresh the page when package is being installed.
Once the package is installed, you will see the message displayed as in the screen shot below.
After installing the plugin, click on 'Settings' menu and expand 'Document Types' tree as shown in the screen shot below.
Edit document type of the page for which you need comments and click 'permissions' icon and 'Add child' as shown in the screen shot below.
Select the comments document type as shown in the screen shot below. And save document type edited.
- Edit the template used by the document type, used in the above steps and add the below line of code where you would like to see the comments section.
@Html.Partial("PageComments", new PageComment.Comments.Comment())
As show in in the screen shot below.
- Edit the document type where you would like to see the dashboard to approve and delete comments. Eg: Home page document type
Add a new tab and new property, select a data type of 'List Comments' as shown in the screen shot below
Just after installing and configuring the plugin, the dashboard will look as below
Using Dashboard Approve or Delete the selected comments. If you would like to ‘Auto Approve’ all the comments as soon as posted, set ‘Auto Approve’ comments field to ‘Yes’. The plugin will also send notification emails as soon as a new comment is posted. Enter the email ID to which you would like to receive all new comments information in the ‘Moderator Email’ and enter the email ID used to send all notification emails in the ‘Site Admin Email’ field as well. Once ‘Notification Email IDs’ and ‘Auto Approve Comments’ settings are changed save the changes by clicking ‘Save’ button. SMTP credentials for sending emails should be provided in the web.config file. Sample code is given below
<smtp> <networkhost="smtp.gmail.com"userName="username"password="password"port="587"enableSsl="true" />
- The front-end part of the comments plugin is built for multilingual sites. Plugin identifies the language based on site’s ‘Culture and Hostname’ language settings. By default, plugin comes with French and English version of resource files, if you would like to extend the plugin for any additional languages add a resource file for the language under ‘App GlobalResources’ folder.
To avoid spamming of the website we implemented a google reCAPTCHA 2.0. Generate Site key for your domain using URL http://www.google.com/recaptcha/admin. Update the Umbraco Dictionary Item ‘Google Captcha Site Key’ with google captcha site key generated for your domain as shown in screen shot below.
Update the Umbraco Dictionary Item ‘Google Captcha Secret Key’ with google captcha Secret key generated for your domain as shown in screen shot below.
- This package comes with the complete source code and you can extend the functionality of the plugin as per your requirement
You are all set to enable comments on your pages and manage your comments, saving you time and effort!