Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

After February 6, this site will no longer have Facebook, Twitter, or OpenID sign-in options. Read our announcement about social media SSO support in 2.8 for more info.

Make sure you have a current, valid email address set in your profile and set a password so you can login without it. If you get locked out after that time, you can choose "Forgot Password" to fix it as long as a valid email is on your account.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

Is there a way to close the poll without closing the thread?

This discussion is related to the Discussion Polls addon.

Title is my question: any way to close a poll without closing the thread for discussion?


  • hgtonighthgtonight ∞ · New Moderator

    There is no way from the UI to close a poll. There is a method to close the poll via the model, so it would be relatively trivial to add.

    Something like the following:

    public function Base_DiscussionOptions_Handler($Sender) {
        if(!CheckPermission('Plugins.DiscussionPolls.Manage')) {
        $Sender->Options .= Wrap(Anchor($Label, '/discussion/closepoll/' . $Discussion->DiscussionID), 'li');
    public function DiscussionController_ClosePoll_Create($Sender, $Args) {
        if(!CheckPermission('Plugins.DiscussionPolls.Manage')) {
            throw PermissionException();
        $DiscussionID = $Args[0];
        $Discussion = $Sender->DiscussionModel->GetID($DiscussionID);
        if ($Discussion) {
            Redirect('/discussion/' . $Discussion->DiscussionID);
        else {
            throw NotFoundException();

    Untested, but that should add a new discussion option to forcibly close the poll. I would suggest adding a check to only have the option if the poll is currently open. And perhaps a method to reopen an accidentally closed poll.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.