Skip to content

Instantly share code, notes, and snippets.

@hertsch
Last active December 23, 2015 07:39
Show Gist options
  • Save hertsch/6602781 to your computer and use it in GitHub Desktop.
Save hertsch/6602781 to your computer and use it in GitHub Desktop.
Helpfile for the kitCommand Comments from the CommandCollection

~~ Comments ~~

Introduction

Comments is a powerful extension which enable the visitors of your website to leave comments at every page or news article. Comments is using a threading, so it is possible to use it as a micro forum, although the users can stay in touch and will be informed about new comments. The users can also rate each comment.

For a general help to the kitCommands, the usage and the general available parameters please refer the < href="{{ FRAMEWORK_URL }}/basic/help/help">kitCommand help.

Parameters

###captcha[]

Switch the reCaptcha protection on or off. By default the reCaptcha is switched on.

~~ comments ... captcha[false] ~~

will switch the reCaptcha off. You can also use

~~ comments ... captcha[0] ~~

###id[]

The parameter id[] can only used in context with the parameter type[], the usage is described at the type[] parameter.

###publish[]

By default the comments will be published after the confirmation of a administrator. With the parameter publish[] you can determine the behavior:

  • immediate - publish new comments immediate, without verification
  • email - the publisher must confirm the comment with an activation link
  • admin - (default) the administrator must confirm the comment with an activation link

email and admin can be combined, separate the values by comma, samples:

~~ comments ... publish[email] ~~

~~ comments ... publish[email,admin] ~~

~~ comments ... publish[immediate] ~~

###rating[]

Comments enable the users to rate each comment with stars from one up to five. If you won't use this function you can disable the rating:

~~ comments ... rating[false] ~~

or

~~ comments ... rating[0] ~~

will switch off the function.

###type[]

Determine the type of the comments. By default comments are assigned to the page of the Content Management System, where the kitCommand ~~ comments ~~ is placed. This will fit in the most cases, but if you are using a blog or a shop you may want to assign the comments to a article instead of a page. With the parameters type[] and id[] you can assign the comments to anything you want.

Example for a blog, i.e. TOPICS:

We assume that the TOPICS article has the ID 99 and you want use TOPICS as type (you can use any description you want, but TOPICS seems to be logical in this case).

Place the kitCommand below the article

~~ comments ... type[TOPICS] id[99] ~~

for the TOPICS article with the ID 104 use

~~ comments ... type[TOPICS] id[104] ~~

Additional Comments knows some magical identifiers:

  • POST_ID - detect the ID of the News article
  • TOPIC_ID - detect the ID of the TOPICS article
  • EVENT_ID - detect the ID of the Event description

where ~~ comments ~~ is placed. So you don't need to know the ID and can use the id[] parameter like this:

~~ comments ... type[TOPICS] id[TOPIC_ID] ~~

at any TOPICS article. Don't care about the ID, Comments will detect it.

The magical identifiers are ideal for usage within templates or anywhere contents are created automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment