Configure Comment Panel


I want to configure Comment panel in our project.
we have two user 1.Admin and 2.Operator

Does it require any scripting if yes please suggest in solution.

How do you want to configure the comments panel? Do you want two different views for the comments panel or do you just want to be able to post comments under admin and operator? the comments component already detects what user is logged in and posts comments under the user that is logged in.

I want only post comments under admin and operator.

First you need a table in SQL for the data.
I have this structure in table ‘notes2’:

ColumnName DataType
id - INT
username - VARCHAR(255)
notetext - VARCHAR(255)
attachmentname - VARCHAR(255)
attachment_data - LONGBLOB
IsSitcky - Bit
Timestamp - TIMESTAMP

On the ‘Comments Panel’ Insert Query1 is:INSERT INTO Notes2 (Notetext, username, TimeStamp, Attachment_data, attachmentname, isSticky) VALUES (?, (SELECT username FROM auth_Users WHERE Username='%s'), CURRENT_TIMESTAMP, ?, ?, ?)

Note: auth_Users in the above refers to where my Users are stored for this project, yours would be xxxx_Users depending on what is set in the ‘Table Prefix’ box in the Users,Roles set up in the gateway.

Insert Query2 is empty

Delete Query is:DELETE FROM Notes2 WHERE Id=%d

Unstick Query is:UPDATE Notes2 SET isSticky=0 WHERE Id=%d

Download Attachment Query is:SELECT Attachment FROM Notes2 WHERE Id=%d

Data is a SQL Query:SELECT Id,Username,Timestamp,NoteText,AttachmentName,isSticky AS sticky FROM Notes2

No scripting for this just a matter of setting the queries to match your table. Hope this helps.

Yes…Done…Thank You Very Much Brett…

Thanks for your reply Brett,

I am little keen to know how to configure two different views for the comments panel.

What two views do you want?