We need a way to filter comments for they status (published, awaiting moderation ...)

Oddly enough, it seems that the status field for comments works the opposite way of the one for nodes: a comment with status 0 is published, a comment with status 1 is moderated, so in order to reuse the operatoryesno I named the filter "Comment: Pending approval".

Is that too ugly?

CommentFileSizeAuthor
views_comment_status.patch.txt821 bytesEgon Bianchet

Comments

Egon Bianchet’s picture

I forgot: we probably should add filters for published nodes and published comments to default view too

merlinofchaos’s picture

Title: views_comment: filter for comment status » views_comment: default 'recent comments' view needs moderation status filter
Category: feature » bug
Status: Needs review » Active

Commited. Though you're right about the recent comments block, so leaving this open to deal with that.

merlinofchaos’s picture

Status: Active » Fixed

And that's also fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)
Anonymous’s picture

If you want comments filtered in the recent comments block so that only the moderated ones are shown.

In the 'comments_recent' view in the defaults tab click on add a filter. Adding it in defaults will filter both the page and the block. An add filter area will appear. In the groups jump menu select comment. Then checkmark 'Comment: In moderation' and press the add button at the bottom of the list. You will see an options screen appear. Now select no for moderated. Personally for relationship I select node, but I'm not sure if this is needed (Can anyone clear this up?). Now click update. In your live preview you see comments which have been approved. Click save. Clear any caches, and your comments block will now show the allowed comments, and not the ones awaiting moderation.

Anonymous’s picture

Status: Closed (fixed) » Needs review
merlinofchaos’s picture

Status: Needs review » Closed (duplicate)

'needs review' means there is a patch that needs review.

Returning to previous status. There doesn't seem to be a question or anything that needs to be acted on.