Polling problem

eransss

Active member
I can not find away to stop people from making polls in specific sub forums on my forum how can i stop that? because i made one of the sub forums into like a ticketing system so my members can report problems but i dont want it showing a place to be able to make polls since after all the only people that can see the tickets are admins and mods and who ever made the ticket i was able to stop them from being able to vote on a poll though
 
... or you can edit the template "thread_create" and use 1 simple and very basic conditional

Search this code:
HTML:
    <h3 class="textHeading">{xen:phrase post_poll}</h3>   
    <dl class="ctrlUnit">
        <dt><label for="ctrl_poll_question">{xen:phrase question}:</label></dt>
        <dd><input type="text" name="poll[question]" class="textCtrl" id="ctrl_poll_question" maxlength="100" /></dd>
    </dl>   
    <dl class="ctrlUnit">
        <dt>{xen:phrase possible_responses}:</dt>
        <dd>
            <ul class="PollResponseContainer">
                <xen:foreach loop="$pollExtraArray" value="$null">
                    <li class="PollNonJsInput"><input type="text" name="poll[responses][]" class="textCtrl" placeholder="{xen:phrase poll_choice}..." maxlength="100" /></li>
                </xen:foreach>
                <li><input type="text" name="poll[responses][]" class="textCtrl" placeholder="{xen:phrase poll_choice}..." maxlength="100" /></li>
                <li><input type="text" name="poll[responses][]" class="textCtrl" placeholder="{xen:phrase poll_choice}..." maxlength="100" /></li>
            </ul>
            <input type="button" value="{xen:phrase add_additional_response}" class="button smallButton FieldAdder JsOnly" data-source="ul.PollResponseContainer li" data-maxfields="{$xenOptions.pollMaximumResponses}" />
        </dd>
    </dl>
    <!-- slot: after_poll_responses -->
    <dl class="ctrlUnit">
        <dt></dt>
        <dd>
            <ul>
                <li><label for="ctrl_poll_multiple"><input type="checkbox" name="poll[multiple]" value="1" id="ctrl_poll_multiple" /> {xen:phrase allow_selection_of_multiple_responses}</label></li>
                <li><label for="ctrl_poll_public_votes"><input type="checkbox" name="poll[public_votes]" value="1" id="ctrl_poll_public_votes" /> {xen:phrase display_votes_publicly}</label></li>
                <li><label for="ctrl_poll_close"><input type="checkbox" name="poll[close]" value="1" class="Disabler" id="ctrl_poll_close" /> {xen:phrase close_this_poll_after}:</label>
                    <ul id="ctrl_poll_close_Disabler">
                        <li>
                            <input type="text" size="5" name="poll[close_length]" value="7" class="textCtrl autoSize" />
                            <select name="poll[close_units]" class="textCtrl autoSize">
                                <option value="hours">{xen:phrase hours}</option>
                                <option value="days" selected="selected">{xen:phrase days}</option>
                                <option value="weeks">{xen:phrase weeks}</option>
                                <option value="months">{xen:phrase months}</option>
                            </select>
                        </li>
                    </ul>
                </li>
            </ul>
        </dd>
    </dl>


And replace it with:
HTML:
<xen:if is='{$forum.node_id} != XX'>
    <h3 class="textHeading">{xen:phrase post_poll}</h3>   
    <dl class="ctrlUnit">
        <dt><label for="ctrl_poll_question">{xen:phrase question}:</label></dt>
        <dd><input type="text" name="poll[question]" class="textCtrl" id="ctrl_poll_question" maxlength="100" /></dd>
    </dl>   
    <dl class="ctrlUnit">
        <dt>{xen:phrase possible_responses}:</dt>
        <dd>
            <ul class="PollResponseContainer">
                <xen:foreach loop="$pollExtraArray" value="$null">
                    <li class="PollNonJsInput"><input type="text" name="poll[responses][]" class="textCtrl" placeholder="{xen:phrase poll_choice}..." maxlength="100" /></li>
                </xen:foreach>
                <li><input type="text" name="poll[responses][]" class="textCtrl" placeholder="{xen:phrase poll_choice}..." maxlength="100" /></li>
                <li><input type="text" name="poll[responses][]" class="textCtrl" placeholder="{xen:phrase poll_choice}..." maxlength="100" /></li>
            </ul>
            <input type="button" value="{xen:phrase add_additional_response}" class="button smallButton FieldAdder JsOnly" data-source="ul.PollResponseContainer li" data-maxfields="{$xenOptions.pollMaximumResponses}" />
        </dd>
    </dl>
    <!-- slot: after_poll_responses -->
    <dl class="ctrlUnit">
        <dt></dt>
        <dd>
            <ul>
                <li><label for="ctrl_poll_multiple"><input type="checkbox" name="poll[multiple]" value="1" id="ctrl_poll_multiple" /> {xen:phrase allow_selection_of_multiple_responses}</label></li>
                <li><label for="ctrl_poll_public_votes"><input type="checkbox" name="poll[public_votes]" value="1" id="ctrl_poll_public_votes" /> {xen:phrase display_votes_publicly}</label></li>
                <li><label for="ctrl_poll_close"><input type="checkbox" name="poll[close]" value="1" class="Disabler" id="ctrl_poll_close" /> {xen:phrase close_this_poll_after}:</label>
                    <ul id="ctrl_poll_close_Disabler">
                        <li>
                            <input type="text" size="5" name="poll[close_length]" value="7" class="textCtrl autoSize" />
                            <select name="poll[close_units]" class="textCtrl autoSize">
                                <option value="hours">{xen:phrase hours}</option>
                                <option value="days" selected="selected">{xen:phrase days}</option>
                                <option value="weeks">{xen:phrase weeks}</option>
                                <option value="months">{xen:phrase months}</option>
                            </select>
                        </li>
                    </ul>
                </li>
            </ul>
        </dd>
    </dl>
</xen:if>
As you can see the "search" code has only been wrapped with 1 conditional. You just need to replace the XX part with your Node ID.
You can also do this modification in your template with the TMS addon.
 
well i only want it for one sub forum inparticlar i wanted a ticketing system so people can report things to the admins and mods but their is no need for the poll and i wanted to get rid of it for just that sub forum i already disabled it from them being able to vote on it but i dont want them to have the option at all of even being able to make it when they post a ticket on the sub forum. I really wish their was a add-on that was a ticketing system
 
Top Bottom