Target release0.1
Source (e.g. Github)https://github.com/ckan/ckanext-disqus
Main featuresExtension that adds the Disqus commenting system to CKAN
Prerequisite / Dependencies
ckan 1.7 or higher / DISQUS account
License
Installed by
Document status
DRAFT

Background and strategic fit

The Disqus extension allows site visitors to comment on individual packages using an AJAX-based commenting system. The downsides of this plugin are that comments are not stored locally and user information is not shared between CKAN and the commenting system.

Activating and Installing

In order to set up the Disqus plugin, you first need to go to disqus.com and set up a forum with your domain name. You will be able to choose a forum name.

To install the plugin, enter your virtualenv and load the source:

pip install -e git+https://github.com/okfn/ckanext-disqus#egg=ckanext-disqus

For ckan versions before 2.0, please use the release-v1.8 branch.

This will also register a plugin entry point, so you now should be able to add the following to your CKAN .ini file:

ckan.plugins = disqus <other-plugins>
disqus.name = YOUR_DISQUS_NAME

At this point, each dataset view page will have Disqus comments. To add comments into other pages, see the next section.

Disqus will use window.location.href as the disqus_url. It is sometimes helpful, especially during development, to specify the base url for disqus to use instead. This can be added to the CKAN .ini file:

disqus.disqus_url = my_staging.server.com

Do not include 'http://' or a trailing slash.

Using the Extension

To have comment threads appear on pages, insert into templates where you want the comments to appear:

{{h.disqus_comments()}}

Note for theme developers: the extensions try to generate a disqus_identifier of the form:

{controller/domain-object-name}::{id}

Where controller = 'group' in the group section, 'dataset' in the dataset section (note that this differs from controller name internally which is still package), 'resource' for resources etc. This identifier will be useful if you want to then reference this comment (e.g. for comment counts) elsewhere in the site.

User interaction and design

The disqus block on the dataset page is directly designed/extracted from the disqus side.

Questions and Answers

Below is a list of Q&A from user sides:

QuestionAnswers
Are the comments visible to anonymous users?Yes. At the moment there is no limitation on the Disqus visibility inside the HEF AgriHUB
Is there any limit to the number of comments?

Yes and No.
Answer : yes because we are using the free version of disqus service. The free version of disqus provides a limited amount of comments pre-day and in total.

Further steps

  • The disqus_url is supplied out Mandana Moshrefzadehaccount. It makes sense to create a new account for HEF and then provide a disqus forum link for HEF agriHIB
  • Other options/software can also be investigated.