Skip to end of banner
Go to start of banner

getAllCommentIds

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Syntax

getAllCommentIds(pageId)

Description

Gets all the comment IDs that are already entered on a page.

Parameters

Parameter name

Type

Required

Description

page ID

numberyesID of the selected page.

Return type

number []

IDs of the comments on the page.

Examples

Example 1

number [] allComm = getAllCommentIds(11801);

print("Page has " + size(allComm) + " comments";

Print Page has 12 comments for example.

Example 2

number [] allComm = getAllCommentIds(11801);
interval year = "365d";


for(number c in allComm) {
	CComment comm = getCommentById(c);
	if(comm.created < (currentDate - year)) {
		deleteComment(c)
	}
}

Deletes all comments older than 1 year from page ID 11801.

See also

  • No labels