{init_message}

Comments in Saurus CMS are handled by two functions:

  • {init_messages} returns a list of parent's child comments.
  • {init_message} initializes one comment with given ID.

Comments can be child objects of any type of content, usually for articles, documents and images. In addition, there is a special content type "subject" initialized by {init_subjects} for creating forums.

Usage

{init_message [id = value] [name = value] [parameter = value ..]}

Returns

One comment object stored in variable defined by parameter "name".

Parameters

id ID of the comment to initialize, usually retrieved by {init_messages} function. When undefined, current ID in URL is used. int  
name Variable for storing the comment object. Default value is "message". string  
on_create

Enables you to set default values when new comment is created.

comma separated string  
  publish: By default, objects are set to be hidden/unpublished when created by user. You can force publishing by using on_create="publish". Default value is "hide".   4.0.2

Attributes

Common attributes      
id ID of the object. int  
parent_id ID of the parent object in site hierarchy. int  
parent_href Hyperlink address to the object in format of ?id=123. When aliases are used, returns alias name in public view instead. string  
buttons

Displays v-shaped context menu for authorized editors.

html  
title Title of the object. string  
body Message contents. string  
author Author of the message. string  
author_email E-mail of the author. string  
comment_count Number of direct child comments.  int 4.0.6
last_commented_time Time of last direct child comment in format of dd.mm.yyyy hh:ii.  datetime 4.0.6
date

Date value in format of dd.mm.yyyy.

date  
fdate Same as "date" attribute but in database format of yyyy-mm-dd date  
datetime

Date and time value in format of dd.mm.yyyy hh:mm.

datetime 4.4.1
fdatetime

Same as "datetime" attribute but in database format of yyyy-mm-dd hh:mm:ss.

datetime 4.4.1
class Class name of the object. Possible values are: "section, article, link, image, comment, poll, document, article's list, link list, login-box, subject, album, iframe-box, event" string  
Parent/topic      
parent_href Hyperlink to the parent object. string  
parent_subject Parent object. object  
parent_subject_id Parent object's ID. int  
parent_subject_title Parent object's title. string  
Author and timestamp      
created_time Time of creation of the object in format of  dd.mm.yyyy hh:ii. datetime 4.0.3
fcreated_time Time of creation of the object in database default format, eg yyyy-mm-dd hh:ii.  datetime 4.0.3
created_user_id ID of the user who initially created the object.  int 4.0.3
created_user_name Name of the user who initially created the object.  string 4.0.3
changed_time

Time of last saving of the object in format dd.mm.yyyy hh:ii.

datetime 4.0.3
fchanged_time Time of last saving of the object in database default format, eg yyyy-mm-dd hh:ii. datetime 4.0.3
changed_user_id ID of the user who saved the object last. int 4.0.3
changed_user_name Name of the user who saved the object last. string 4.0.3