Sourcefabric Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Newscoop 4.2 Cookbook

Comment form

Form - Comment

Purpose:

Generate the form and default data fields for article comment submission. Inside the form camp_edit statements can be used to generate article comment input fields.

Syntax:

{{ comment_form [template="<template_name>"]
                submit_button="<submit_button_name>"
                [preview_button="<preview_button_name>"]
                [html_code="<html_code>"]
                [button_html_code="<html_code>"] }}
   <list_of_instructions>
{{ /comment_form }}
  • <template_name>: the name of the next template to be requested when submitting the comment
  • <submit_button_name>: the name of the button for submitting the comment
  • <preview_button_name>: the name of the button for previewing the comment
  • html_code: you can insert whatever HTML code you want in the <form> statement; for example: {{ user_form .. html_code="id=\"my_id\"" }}
  • button_html_code: you can insert whatever HTML code you want in the button input field statement; such as: {{ user_form .. button_html_code="id=\"my_submit_id\"" }}

Edit Comment

Purpose:

Generates text fields so that a user can enter a comment. This statement should be used inside the comment form.

Syntax:

{{ camp_edit object="comment" attribute="<attribute>"
                              [html_code="<HTML_code>"]
                              [size ="<field_length>"]
                              [columns="<max_columns>"]
                              [rows="<max_rows>"] }}

Filters:

<attribute> being one of the following:

  • nickname: a place for the user to type in a nickname
  • reader_email: a place for the user to type in their email address; this field is optional for logged in readers because the email can be read from the subscribers database
  • subject: a place for the user to type in a subject line for their comment
  • content: a place for the user to type in their comment.

The attributes reader_email, subject and content are mandatory in each Edit Comment form.

Note: the columns and rows parameters were implemented starting with Newscoop version 3.2.2.

Constraints:

The comment edit field can only be used inside the comment form.

Edit CAPTCHA

Purpose:

Generates a text field allowing the user to input the CAPTCHA code for spam control. This statement should be used inside the comment form.

Syntax:

{{ camp_edit object="captcha" attribute="code"
                              [html_code="<HTML_code>"]
                              [size ="<field_length>"] }}

CAPTCHA ImageLink

Purpose:

"captcha_image_link" will insert the link for the CAPTCHA image. Use inside an "img" HTML tag as follows:

 <img src="{{ captcha_image_link }}">

Syntax:

{{ captcha_image_link }}

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.