What this does
This will give you the option to enable or disable poll permissions on a per-forum basis. You could create this effect using the forum permissions, but you would have to edit every single forum, and every single usergroup to create this effect. This was requested by a user, so I created it for that user.
How this plugin works
The concept of this plugin is simple. If you have polls enabled on one forum, then all users will be allowed to post polls and add polls to threads in that forum. It will look for the forum permissions if enabled in a forum. If you have polls disabled on a forum, then this hack will over-ride the forum permissions and stop users from posting new polls and adding polls to existing threads in that forum; even if they know the full URL (poll.php?do=newpoll&t=X)
Also note that if you disable polls on a forum, all existing polls in that forum will not be shown. (They won't be deleted, just hidden from view)
To do list...
Time to install: 1 minute
Queries to run: 1 (Installer Controlled)
File Mods: 0
Templates to edit: 0
Templates to add: 0
New Phrases: 3
New Plugins: 5
Credits
Thanks to Paul M for eliminating a template edit.
Thanks to Boofo for the idea of this hack and cleaning some of the code up for me.
Important Notes This feature is disabled on all forums by default Read next post for more info on how to enable/disable polls on all forums
Testing Information
This hack was tested on 2 live sites and my local machine with zero problems. Though bugs could always appear. If so, please post them here and we will see what we can do to fix them.
Product History
Wednesday, April 26, 2006 - Public Released
Help & Support
Before asking for support, please make sure you have done all the necessary changes! If you still need support, please post a reply here and double check that you have clicked the Install Button. We will try to support this hack the best we can. Support is not guaranteed!
Please post any bugs and errors here. Hope you like it, feedback is always welcomed!
Enable On All Forums
If your a member that has alot of forums and would like to enable this feature on ALL forums. Then please run the following query after you have installed the product:
[sql]UPDATE forum SET canpostpolls = 1[/sql]
Once you have executed the above query, please remember to save at least one of your forum options, so the above query will be cached in the datastore.
Disable On All Forums
By default, this feature is disabled on all forums. Though if you need to disable the feature on all forums for whatever reason. Then please run the following query after you have installed the product:
[sql]UPDATE forum SET canpostpolls = 0[/sql]
Once you have executed the above query, please remember to save at least one of your forum options, so the above query will be cached in the datastore.