vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   End-User Options - Sakera's Hide Poll Results (https://vborg.vbsupport.ru/showthread.php?t=231976)

GONUMBER6 03-14-2010 07:58 PM

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?

Sakera 03-14-2010 08:02 PM

That would require modifying the widget itself - i've not yet started work on that :)

GONUMBER6 03-15-2010 01:29 AM

I want to be the first to know when you do! Thanks for your mod, I appreciate it!

texasteamplayer 05-26-2010 02:00 AM

I like this. I suggest that you add the option "show results once a user has voted". that's a pretty common setting.

Leica.Robbiani 05-31-2010 06:46 PM

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.

cortinator 06-20-2010 05:47 AM

Upgraded to 4.0.4 and this mod still works perfectly.

Drpepper99uk 07-04-2010 08:02 PM

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:

https://vborg.vbsupport.ru/external/2010/07/41.png

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.

Drpepper99uk 07-05-2010 02:12 PM

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.

mitch84 09-05-2010 04:22 AM

this hack work with vb4.0.6? thx

Kay Daver 12-03-2010 05:18 PM

I'm just not seeing instructions on how to install this? Help?


All times are GMT. The time now is 11:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02077 seconds
  • Memory Usage 1,764KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete