UserGuide: Comments plugin

Comments plugin provides support for page comments.

Plugin is integrated with BetterEditor and Captcha plugin, but it doesn't depend on them.

Inserting into pages(Edit)

  • Globally - insert {plugin:COMMENTS} into your template on some suitable place
    • If there's some page on which you don't want comments, place {NO_COMMENTS} into this page
  • Locally - place {COMMENTS} into the desired page

Customization(Edit)

There's not much to configure - only the sorting order of comments (oldest/newest first), in plugins/wkp_Comments.php near the top.

Template(Edit)

Appearance of the comments can be arbitrarily changed using its template located in plugins/Comments/template.html.

Comments template is divided into two sections:

  • Form - contains form with input fields etc., it is rendered only once
  • Comments - is enclosed in {item} and {/item} and is rendered for each comment

Form tags(Edit)

  • {COMMENTS} - localized "comments"
  • {FORM_NAME} - localized "name"
  • {FORM_EMAIL} - localized "email"
  • {FORM_CONTENT} - localized "content"
  • {FORM_SUBMIT} - localized "submit"
  • {NUMBER_OF_COMMENTS} - number of comments :)

Following are values of previously submitted comment which failed captcha text. Theys should be placed inside the value="" and textarea.

  • {FORM_NAME_VALUE}
  • {FORM_EMAIL_VALUE}
  • {FORM_CONTENT_VALUE}

Comment tags(Edit)

These can only be used inside the {item}{/item}.

  • {CONTENT} - contains actual comment content
  • {NAME} - name of the author
  • {EMAIL} - email of the author
  • {NAME_TO_EMAIL} - returns name as a link to the email, if filled, or just plain name if not filled
  • {IP} - IP of the author
  • {DATE} - date of the comment, formatted using the $DATE_FORMAT set in the core LionWiki
  • {NUMBER} - chronological number of the comment

Deleting comments(Edit)

Deleting comments is password protected - by Admin password.

RSS(Edit)

By default, RSS file with recent comments is generated in var/comments-rss.xml.