Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Enable/Disable Poll Permissions Per Forum Details »»
Enable/Disable Poll Permissions Per Forum
Version: 1.4, by Logikos Logikos is offline
Developer Last Online: Sep 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.5.4 Rating:
Released: 04-25-2006 Last Update: 04-25-2006 Installs: 5
DB Changes Uses Plugins
 
No support by the author.


Enable/Disable Poll Permissions Per Forum



Keywords
Poll, Polls, Permissions, Per-Forum

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.

Click It For Support!

Install This Product



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!

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-26-2006, 04:06 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 04-26-2006, 04:20 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent job, sir. Clicking Install as I type.
Reply With Quote
  #4  
Old 04-26-2006, 05:21 AM
Atakan KOC's Avatar
Atakan KOC Atakan KOC is offline
 
Join Date: Feb 2006
Location: Istanbul
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great mod !
Reply With Quote
  #5  
Old 04-26-2006, 05:58 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks man!
Reply With Quote
  #6  
Old 04-26-2006, 06:21 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't forget the install button, guys.
Reply With Quote
  #7  
Old 04-30-2006, 11:07 PM
TwTom TwTom is offline
 
Join Date: Apr 2006
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just what I'm looking for. Thanks much!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07321 seconds
  • Memory Usage 2,261KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete