Turn off comments and replies on a poll?

For the specific scenario in the OP of preventing replies to polls, it could be possible to use the close topic approach + a micro theme component to hide things based on tag. Though instead of the reply buttons, target the closed padlock icons so the topic doesn’t look ‘closed’ (until you close the poll and remove the tag).

I went with a tag of open-poll for this, and created a custom theme component of:


// hide lock icon in topic list and within topic

.tag-open-poll .topic-statuses .d-icon-lock  {
    
    display: none;
}

// hide 'closed' small action post

.tag-open-poll .small-action {
    
    display: none;
}

(Though remember my CSS is not so hot, so please check my homework :slight_smile:)

And then something like this for the OP of the topic:

And it’ll look like this in the topic list:

And if you remove the open-poll tag when the poll is closed then everything appears back into view again and it will look properly closed when the vote is over. :magic_wand:

4 Likes