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)

Sakera 01-01-2010 10:00 PM

Sakera's Hide Poll Results
 
1 Attachment(s)

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.

mitch84 01-03-2010 04:16 AM

good idea, installed, thx

maximutt 01-03-2010 09:32 AM

Awesome Sakera! Thank you!

Is there a way to hide results from the thread starter as well? Basically, I'd like only Admin to see results. Even if it's putting a is_not_member conditional around a certain section of a template, any help you could give would be greatly appreciated.

One feature I'd like to request for any future updates would be the ability to hide/show results by usergroup(s).

Sakera 01-03-2010 11:52 AM

That is simply a matter of removing

Code:

$vbulletin->userinfo['userid'] == $threadinfo['postuserid']
from the conditionals in some of the plugins, and the or separator of cource.

I do not have any imediate plans on extending this modification, other than fixing bugs etc. It's a simple construction put together to fit this exact need, and i think it's time vbulletin gave the poll system a little work instead of relying on a modification for such basic behaviour :)

Veer 01-03-2010 03:49 PM

Sakera, thanks for the update.

Drpepper99uk 01-06-2010 01:48 PM

Hi Thomas,

Thanks for updating this mod, I really appreciate it as you know I use this mod a lot with my photography forums for my members to vote of which photo's they like best and having a cut off time period for voting and the results not shown till the end is great....why VB couldn't have this added themselves with 4.0 released is crazy!!!

Great work, Shame not all coders on here wish to updates their mods to support 4.0.

Mike.

Sakera 01-14-2010 02:36 PM

Does everything work ok? Havent upgraded to v4 myself yet, so havent tested the modification properly myself :)

Veer 01-14-2010 02:48 PM

Yeah, works good on vb4 gold

cooltechie 01-19-2010 11:42 PM

I can't believe this is not included by default in vb4.

I tried to modify existing poll after installing mod but don't see option to hide results. Where should the settings be?

ti07shadow 01-20-2010 05:59 AM

I think you should make it so after the vote is over or when you decide to, make it so you can make the results viewable..

What i want to do is make it so when I feel the vote is over or w/e I can use the edit poll function and uncheck the hide poll results and close the poll so users can see what the end result was. that way the poll remains private, yet at the end they can see the results.

Sakera 01-20-2010 06:04 AM

Quote:

Originally Posted by cooltechie (Post 1960715)
I can't believe this is not included by default in vb4.

I tried to modify existing poll after installing mod but don't see option to hide results. Where should the settings be?

Should be in edit poll ...

Sakera 01-20-2010 06:05 AM

Quote:

Originally Posted by ti07shadow (Post 1960897)
I think you should make it so after the vote is over or when you decide to, make it so you can make the results viewable..

What i want to do is make it so when I feel the vote is over or w/e I can use the edit poll function and uncheck the hide poll results and close the poll so users can see what the end result was. that way the poll remains private, yet at the end they can see the results.

It's already like that. It can either unveil the results automaticly at poll end or not, your choice.

ti07shadow 01-20-2010 06:21 AM

Quote:

Hide poll results until poll is closed or poll hits timeout.
doh. didnt see that lol

Jinovich 03-04-2010 10:33 AM

Thank you for taking the time to update this mod. We use it for unbiased user feedback this modification is really underated for how useful it actually is.

GONUMBER6 03-12-2010 05:16 PM

On my site the results are hidden, but you can still see the "bars".

http://www.englishbulldognews.com/fo...rch-VOTE-NOW!-)

Please help! Please and thank you!

Sakera 03-12-2010 05:35 PM

4.02 has broken my mod. I will update the mod asap.

Thomas

War.Frog 03-12-2010 05:38 PM

Quote:

Originally Posted by Sakera (Post 2002292)
4.02 has broken my mod. I will update the mod asap.

Thomas

Great news. I just came across this mod and I'm very interested in adding it once it's 4.02 compatible!

Sakera 03-12-2010 08:01 PM

The xml is now updated to 1.4 for 4.0.2

War.Frog 03-13-2010 01:00 AM

Wow that was quick! Nice...installed and rated!

Veer 03-13-2010 06:49 AM

thanks for the update.

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?

AusPhotography 01-13-2011 11:18 PM

Thanks! It works well!

Installation - just load the product XML file via AdminCP/Plugins & Products/Manage Products as normal.

nul7 01-29-2011 11:29 AM

installed...thanks

DirtRider 05-27-2011 03:45 PM

Can you hide the results from mod and super mods or just hide them from everyone ?

Littlerocket 10-28-2011 01:08 PM

Doesn't seem to work in 4.1.5. Great mod though, hopeful it'll work with 4.1.5 one day.

AusPhotography 10-28-2011 09:57 PM

Quote:

Originally Posted by Littlerocket (Post 2262315)
Doesn't seem to work in 4.1.5. Great mod though, hopeful it'll work with 4.1.5 one day.

It works for us on 4.1.7 ?? It also worked when we were running 4.1.5

Santi86 10-30-2011 06:50 AM

Don't works with 4.1.7

mitch84 10-30-2011 09:12 AM

Quote:

Originally Posted by Santi86 (Post 2262844)
Don't works with 4.1.7

yes, you're right

AusPhotography 11-03-2011 07:28 AM

1 Attachment(s)
Here is a version updated for 4.1.7

Published as per OP Re-usable code :D

BTW: It worked for me because we had modified it for our site. This is a generic 4.1.7 version.

AusPhotography 11-03-2011 10:50 PM

Sakera was last online in March 2011 :(

I'm quite happy to continue publishing maintenance releases of this hack as I need it for our site. :up:

This is also relevant (i.e. add the feature to the core product) http://tracker.vbulletin.com/browse/VBIV-10837

mitch84 11-04-2011 12:48 PM

thank you, work fine on vb4.1.7pl1


All times are GMT. The time now is 06:17 AM.

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.01360 seconds
  • Memory Usage 1,843KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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