Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Sakera's Hide Poll Results Details »»
Sakera's Hide Poll Results
Version: 1.5, by Sakera Sakera is offline
Developer Last Online: Jan 2015 Show Printable Version Email this Page

Category: End-User Options - Version: 4.1.8 Rating:
Released: 01-01-2010 Last Update: 12-10-2011 Installs: 175
DB Changes Uses Plugins Auto-Templates
Re-useable Code Translations  
No support by the author.


What is this?


This Modification lets your users hide poll results for everyone but Moderators and Administrators, and the thread owner himself. They can choose to hide the results forever, or to show them automatically when the thread is closed or hit timeout.

Please see attached screenshots to get an idea on how it works.


Features
- Hide poll results forever
- Hide poll results until poll is closed or poll hits timeout.
- Shows a notice to Users that see the results (Moderators, Admin and thread starter) that the results are hidden.
- Moderators and Admin's can change settings via 'Edit Poll'


Template Edits
All template edits are done automaticly when needed. Hopefully this doesn't break in situations with hacked templates, if so happens please notify me what hack caused the problem.


Version History:
  • 1.3 - First VB4 Release
  • 1.4 - 4.0.2 Release
  • 1.5 - 4.1.7 Release - Thanks to snoopytas
VB3 version of this hack: Click here.


Please click INSTALL if you use this hack.

Download Now

File Type: xml product-sakeras_hide_poll_results 1.4 PRE4.1.7.xml (11.8 KB, 62 views)
File Type: xml product-sakeras_hide_poll_results 1.5.xml (11.7 KB, 322 views)

Screenshots

File Type: jpg hidden.jpg (28.7 KB, 0 views)
File Type: jpg newpoll.jpg (71.3 KB, 0 views)
File Type: jpg results.jpg (17.2 KB, 0 views)

Show Your Support

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

Comments
  #22  
Old 03-14-2010, 07:58 PM
GONUMBER6's Avatar
GONUMBER6 GONUMBER6 is offline
 
Join Date: Jan 2010
Location: Sunny Arizona
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sakera,
Thank you for the update on the poll bars!

How would I create a poll widget that hides the poll results and votes as well?
Reply With Quote
  #23  
Old 03-14-2010, 08:02 PM
Sakera Sakera is offline
 
Join Date: May 2002
Location: Trondheim, Norway
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would require modifying the widget itself - i've not yet started work on that
Reply With Quote
  #24  
Old 03-15-2010, 01:29 AM
GONUMBER6's Avatar
GONUMBER6 GONUMBER6 is offline
 
Join Date: Jan 2010
Location: Sunny Arizona
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want to be the first to know when you do! Thanks for your mod, I appreciate it!
Reply With Quote
  #25  
Old 05-26-2010, 02:00 AM
texasteamplayer's Avatar
texasteamplayer texasteamplayer is offline
 
Join Date: Jan 2010
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like this. I suggest that you add the option "show results once a user has voted". that's a pretty common setting.
Reply With Quote
  #26  
Old 05-31-2010, 06:46 PM
Leica.Robbiani Leica.Robbiani is offline
 
Join Date: Sep 2007
Location: South Germany
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi texasteamplayer,

Quote:
I suggest that you add the option "show results once a user has voted". that's a pretty common setting.
This is a thing I also suggest. Well, I don't have a use for the option "Hide poll results" like it is in the mod, so I changed the the plugin "Remove results view from poll.php" to

PHP Code:
if ((!$uservoted && !can_moderate($threadinfo['forumid'], 'caneditpoll') && !$showresults) || $nopermission
{

  if ((
$pollinfo['hidden_results'] == 1) && (!($vbulletin->userinfo['userid'] == $threadinfo['postuserid'])))
  {
    
$option['graphicnumber'] = 1;
    
$option['barnumber'] = 1;
//        $option['votes'] = $vbphrase[hidden_results_statement];
        
$option['percent'] = 0;
        
$option['percentraw'] = 0;
        
$option['remainder'] = 201;
        
$show['pollvoters'] = TRUE;
  }

  elseif (
$pollinfo['hidden_results'] == 2)
  {
        if (!(!
$pollinfo['active'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0)))
    {
      
$option['graphicnumber'] = 1;
      
$option['barnumber'] = 1;
//          $option['votes'] = $vbphrase[hidden_results_statement];
          
$option['percent'] = 0;
          
$option['percentraw'] = 0;
          
$option['remainder'] = 201;
          
$show['pollvoters'] = FALSE;
        }
  }

an I changed the plugin "Remove results view from showthread.php" to

PHP Code:
if ((!$uservoted && !can_moderate($threadinfo['forumid'], 'caneditpoll') && !$showresults) || $nopermission)
{

 if (
$pollinfo['hidden_results'] == && (!($vbulletin->userinfo['userid'] == $threadinfo['postuserid'])))
 {

    
$option['graphicnumber'] = 1;
    
$option['barnumber'] = 1;
//        $option['votes'] = $vbphrase[hidden_results_statement];
        
$option['percent'] = 0;
        
$option['percentraw'] = 0;
        
$option['remainder'] = 201;
 }
 elseif (
$pollinfo['hidden_results'] == 2)
 {
        if (!(!
$pollinfo['active'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0)))
    {
      
$option['graphicnumber'] = 1;
      
$option['barnumber'] = 1;
//          $option['votes'] = $vbphrase[hidden_results_statement];
          
$option['percent'] = 0;
          
$option['percentraw'] = 0;
          
$option['remainder'] = 201;
        }
 }

directly in the Plugin manager.

With a little time it should not be a problem to add this option ...

Best regards

L.R.
Reply With Quote
  #27  
Old 06-20-2010, 05:47 AM
cortinator cortinator is offline
 
Join Date: Oct 2007
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Upgraded to 4.0.4 and this mod still works perfectly.
Reply With Quote
  #28  
Old 07-04-2010, 08:02 PM
Drpepper99uk Drpepper99uk is offline
 
Join Date: Feb 2009
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I'm running 4.0.3 and I don't seem to have the option to show/hide results when the poll has finished, it's strange as I used to be able to select this option and now I can't and all I see is this when starting a poll on my forums:



How has this happened? I only have the option to not select make votes public and there is not option to have the result shown for admin/mods only.

Mike.
Reply With Quote
  #29  
Old 07-05-2010, 02:12 PM
Drpepper99uk Drpepper99uk is offline
 
Join Date: Feb 2009
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi again,

Just seen on my forums that "enable hooks was added to my config.php so this is why it wouldn't work properly.

All sorted now!!

Mike.
Reply With Quote
  #30  
Old 09-05-2010, 04:22 AM
mitch84 mitch84 is offline
 
Join Date: Mar 2008
Location: france
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this hack work with vb4.0.6? thx
Reply With Quote
  #31  
Old 12-03-2010, 05:18 PM
Kay Daver Kay Daver is offline
 
Join Date: Dec 2010
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm just not seeing instructions on how to install this? Help?
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 12:19 AM.


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.08982 seconds
  • Memory Usage 2,362KB
  • Queries Executed 26 (?)
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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete