Class Comment
- Namespace
- Dynamicweb.Content.Commenting
- Assembly
- Dynamicweb.dll
Represents comments and ratings of items in Dynamicweb
public class Comment
- Inheritance
-
Comment
- Inherited Members
Constructors
Comment()
Initializes a new instance of Comment.
public Comment()
Properties
Active
Gets or sets a value indicating whether this Comment is active.
public bool Active { get; set; }
Property Value
CreatedBy
Gets or sets the user id that created this comment, if logged in.
public int CreatedBy { get; set; }
Property Value
CreatedDate
Gets or sets the created date.
public DateTime CreatedDate { get; set; }
Property Value
EditedBy
Gets or sets the user id that edited this comment, if logged in.
public int EditedBy { get; set; }
Property Value
EditedDate
Gets or sets the edited date.
public DateTime EditedDate { get; set; }
Property Value
Gets or sets the email of the user who comments.
public string Email { get; set; }
Property Value
ID
public int ID { get; set; }
Property Value
Ip
Gets or sets the ip address of the user who commented.
public string Ip { get; set; }
Property Value
IsNew
public bool IsNew { get; }
Property Value
ItemID
Gets or sets the identifier of commented item, e.g. product id or page id.
public string ItemID { get; set; }
Property Value
ItemType
Gets or sets the type of the item. I.e. page, product, news
public string ItemType { get; set; }
Property Value
LanguageId
Gets or sets the language identifier, e.g. "LANG1" as product language id or "1" as page area id.
public string LanguageId { get; set; }
Property Value
Likes
Gets or sets the number of likes of this comment.
public int Likes { get; set; }
Property Value
Name
Gets or sets the name of the user who comments.
public string Name { get; set; }
Property Value
Nolikes
Gets or sets the number of nolikes of this comment.
public int Nolikes { get; set; }
Property Value
ParentID
Gets or sets the ID of the parent comment.
public int ParentID { get; set; }
Property Value
Rating
Gets or sets the rating made by the user who comments.
public int Rating { get; set; }
Property Value
Replies
Gets the replies.
public CommentCollection Replies { get; }
Property Value
- CommentCollection
- The replies.
Text
Gets or sets the text/comment of the user who comments.
public string Text { get; set; }
Property Value
Token
[Obsolete("Use GetToken instead.")]
public string Token { get; }
Property Value
Website
Gets or sets the website of the user who comments.
public string Website { get; set; }
Property Value
Methods
Delete()
[Obsolete("Use Services.Comments.Delete instead.")]
public void Delete()
Delete(int)
Deletes the comment with specified ID.
[Obsolete("Use Services.Comments.Delete instead.")]
public static void Delete(int id)
Parameters
id
int- Comment ID to delete.
Fill(IDataReader)
Fills the object with data from the specified datareader.
[Obsolete("Do not use")]
public void Fill(IDataReader reader)
Parameters
reader
IDataReader- The datareader.
FillRow(DataRow)
Fills the row with the values of the properties.
[Obsolete("Do not use")]
protected void FillRow(DataRow row)
Parameters
row
DataRow- The row.
GetCommentById(int)
Gets a comment by Comment id.
[Obsolete("Use Services.Comments.GetCommentById instead.")]
public static Comment GetCommentById(int id)
Parameters
id
int- The id of the comment to retrieve.
Returns
GetComments()
Gets all the comments.
[Obsolete("Use Services.Comments.GetComments instead.")]
public static CommentCollection GetComments()
Returns
GetComments(string, string, string)
Gets the comments by type, language and id.
[Obsolete("Use Services.Comments.GetComments instead.")]
public static CommentCollection GetComments(string itemType, string itemID, string languageID)
Parameters
itemType
string- Type of the item, i.e "ecomProduct".
itemID
string- The item ID, i.e. "PROD1".
languageID
string- The langugage ID, i.e. "LANG1".
Returns
GetComments(string, string, string, bool)
Gets the comments by type, language and id.
[Obsolete("Use Services.Comments.GetComments instead.")]
public static CommentCollection GetComments(string itemType, string itemID, string languageID, bool onlyActive)
Parameters
itemType
string- Type of the item, i.e "ecomProduct".
itemID
string- The item ID, i.e. "PROD1".
languageID
string- The langugage ID, i.e. "LANG1".
onlyActive
bool- If set to true, only return comments marked as active (approved)
Returns
GetCommentsBySql(string)
Gets the comments by SQL.
[Obsolete("Use Services.Comments.GetComments instead.")]
public static CommentCollection GetCommentsBySql(string sql)
Parameters
sql
string- The SQL.
Returns
GetCommentsByTypeAndId(string, string)
Gets the comments by type and id.
[Obsolete("Use Services.Comments.GetComments instead.")]
public static CommentCollection GetCommentsByTypeAndId(string itemType, string itemID)
Parameters
Returns
GetCommentsByTypeLanguageAndId(string, string, string)
[Obsolete("Use Services.Comments.GetComments instead.")]
public static CommentCollection GetCommentsByTypeLanguageAndId(string itemType, string itemID, string languageID)
Parameters
Returns
GetCommentsByTypeLanguageAndId(string, string, string, bool)
[Obsolete("Use Services.Comments.GetComments instead.")]
public static CommentCollection GetCommentsByTypeLanguageAndId(string ItemType, string itemID, string languageID, bool onlyActive)
Parameters
Returns
GetToken()
Gets a token that can be used to verify actions, e.g. delete, like etc.
public string GetToken()
Returns
IsValidToken(string)
public bool IsValidToken(string token)
Parameters
token
string
Returns
Save()
Saves current data to the data base.
[Obsolete("Use Services.Comments.Save instead.")]
public void Save()