Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Advanced Poll Options Details »»
Advanced Poll Options
Version: 2.0, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.2.x Rating:
Released: 01-07-2017 Last Update: 02-11-2017 Installs: 12
DB Changes Uses Plugins Auto-Templates
Translations  
No support by the author.

This product is the result of a request from SilverBoy posted here:

vBulletin 4 Request - Poll checks

Overview:

This product allows you to designate certain usergroups whose members will have access to the advanced poll voting permission options that you select as active. These advanced options are on a per poll basis, that is, each poll can have its own set of advanced permission settings. The setting from which you can choose are:

Minimum Post Count: Users will be required to have at least the designated number of posts before being able to vote on polls.
Minimum Length Of Membership: Users will be required to have been a member of the forum for at least the designated number of days before being able to vote on polls.
Recent Post Requirement: Users will have to have posted during the last number of designated days before being able to vote on polls.
Reputation Points: Users will be required to have at least the designated number of reputation points before being able to vote on polls.
Infraction Points: Users will be required to have no more than the designated number of infraction points before being able to vote on polls.
User Groups: Users will be required to be a member of at least one of the designated usergroups before being allowed to vote on polls.

As of version 2.0, you now have global settings that will apply to all polls, and can only be overridden by users with access to the advanced options.

A user who has access to these advanced options, will see them when creating/editing a poll as follows:



Updates:

Version 1.0.1:
  • Minor bug fixes.

Version 1.1:
  • Product now overrides usergroup and forum permissions to allow members of designated usergroups to vote.

Version 1.2:
  • When editing polls, entries with 0 as value display as blank.

Version 1.3:
  • Added setting to allow for selecting managing usergroups who can restrict poll voting by usergroup.

Version 1.4:
  • Added "Infraction Points" as an advanced poll option.

Version 1.5:
  • Added the option to require users to reply first to the poll thread before being allowed to vote.

Version 2.0:
  • Added settings for global options, that can only be overridden by users with access to the per poll advanced options.

Compatibility:

Tested and working on VB 4.2.x and may work on all 4.x versions of vBulletin.

Backup/Warning:

This product does alter your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new mod.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.

To Install:
  • Download and extract the attached .zip file.
  • Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  • Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  • Click "Import."
  • You MUST enable the product in the settings before it will function.
  • Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.



Support for this product can be found here:

Download Now

File Type: zip MarkFL - Advanced Poll Options v2.0.zip (8.1 KB, 43 views)

Screenshots

File Type: png markfl_advancedpolls_options.png (30.2 KB, 0 views)
File Type: jpg markfl_advancedpolls_acp.jpg (80.3 KB, 0 views)

Supporters / CoAuthors

Show Your Support

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

Comments
  #2  
Old 01-08-2017, 05:32 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good job my friend
Reply With Quote
  #3  
Old 01-08-2017, 05:37 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you'd like any changes, please let me know.
Reply With Quote
  #4  
Old 01-08-2017, 05:40 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, let me test it and tell you if there is any thing
Reply With Quote
  #5  
Old 01-08-2017, 05:42 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I should have mentioned, all of the text on the new advanced options (the titles and descriptions) is phrased so you can translate, or change it as you see fit. Just look for global phrases that begin with:

markfl_advancedpolls

Reply With Quote
Благодарность от:
CAG CheechDogg
  #6  
Old 01-08-2017, 05:44 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't worry about this
I have translated my forum till vb1.1.3 and 1.1.5 days (2001) ^_^
Reply With Quote
  #7  
Old 01-08-2017, 07:08 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried to add a poll, and use only usergroups option and let other options blank, then I get this MySql error

PHP Code:
Database error in vBulletin 4.2.3:

Invalid SQL:

            
INSERT INTO advancedpolls
                
(
                    
pollidpostcountmembershiprecentpostreputation usergroups
                
)
            
VALUES
                
(
                    
5230000'4,2,16,15,35,6,5,13,1,3,47,46,7,14'
                
);

MySQL Error   You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near 'usergroups
                )
            VALUES
                (
                    523, 0, 0, 0, 0, '
4,2,16,15,35,6,5,13,' at line 3
Error Number  : 1064
Request Date  : Sunday, January 8th 2017 @ 09:06:35 PM
Error Date    : Sunday, January 8th 2017 @ 09:06:35 PM
Script        : http://www.manshor.net/forum/poll.php?do=postpoll&t=260571
Referrer      : http://www.manshor.net/forum/poll.php?t=260571&polloptions=5
IP Address    : 169.255.108.131
Username      : ���� �������
Classname     : vB_Database_MySQLi
MySQL Version : 5.5.52-cll

Stack Trace:

#0 vB_Database->halt() called in [path]/includes/class_core.php on line 1403
#1 vB_Database_MySQLi->execute_query() called in [path]/includes/class_core.php on line 444
#2 vB_Database->query_write() called in [path]/poll.php(339) : eval()'
d code on line 26
#3 eval() called in [path]/poll.php on line 339 
Reply With Quote
  #8  
Old 01-08-2017, 07:36 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found the bug ..

in (Save Advanced Options For New Poll) plugin you forget to add (,) between reputation and usergroups.
the code must be like this
PHP Code:
$vbulletin->db->query_write("
            INSERT INTO " 
TABLE_PREFIX "advancedpolls
                (
                    pollid, postcount, membership, recentpost, reputation, usergroups 
Reply With Quote
  #9  
Old 01-08-2017, 07:41 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another issue, when trying to delete any thread even if it didn't have a poll I get an error message
PHP Code:
 Fatal errorCall to a member function query_write() on null in /home/manshor/public_html/forum/includes/class_dm_threadpost.php(1545) : eval()'d code on line 1 
Reply With Quote
  #10  
Old 01-08-2017, 08:07 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another issue, the system didn't let unregistered users to vote on the poll even if I add unregistered group to the group list that can vote if I disabled it in the usergroup global options (usergoup seetings) and in forum permissions.
Reply With Quote
Reply

Thread Tools

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 03:37 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.05127 seconds
  • Memory Usage 2,337KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete