Monday, 6 March 2017

Know2Comment plugin

NRKbeta Know2Comment Require the user to pass a quiz about the story before being able to comment.
This plugin disables the comment form until a user has passed a quiz about the story he’s about to comment on.
The plugin is made for WordPress, but the JavaScript component can easily be implemented into other CMS systems as well.
Download the plugin
Rename the downloaded folder from nrkbetaquiz-master to nrkbetaquiz
Upload it to your plugins-folder
Enable the plugin in your wordpress backend
Fill out the quiz questions and answers in the post admin interface
Start using it!
Usage (outside of WordPress)
If you’re using a different content management system, you can still use the JavaScript component to enable this functionality on your site.
The component requires a DIV right before the container which holds your comment form. The DIV has two data-attributes: data-nrkbetaquiz and data-nrkbetaquiz-error. The DIV also needs the class nrkbetaquiz.
data-nrkbetaquiz-error is a string with the error message in case the user has answered the quiz wrongfully. data-nrkbetaquiz is an array with the following structure:
text: ‘Who is the current president of The Unites States?’


No comments:

Post a Comment