View Full Version : End-User Options - Sakera's Hide Poll Results
Sakera
01-01-2010, 10:00 PM
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 (https://vborg.vbsupport.ru/member.php?u=228781)
VB3 version of this hack: Click here. (https://vborg.vbsupport.ru/showthread.php?t=146115)
Please click INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=231976) 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
$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 :)
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 :)
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
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
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
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/forums/showthread.php?143-English-Bulldog-Photo-contest-for-March-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
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!
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,
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
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
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;
}
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.
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
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
Don't works with 4.1.7
yes, you're right
AusPhotography
11-03-2011, 07:28 AM
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
Littlerocket
11-12-2011, 08:20 PM
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.
Thanks for that, and the PM!
GONUMBER6
11-21-2011, 03:35 PM
Not working in 4.1.8 do you think the 4.1.7 will work?
EDIT: Yes, it worked.
AusPhotography
12-07-2011, 12:56 AM
The hack works for 4.1.8 using my code -- https://vborg.vbsupport.ru/showpost.php?p=2264026&postcount=38
Kym
lazytown
12-10-2011, 10:33 PM
Is there any way that you can set only certain usergroups to have the ability to create a poll that hides the results? I want to be able to do it as admin, but not allow others.
Sakera
12-11-2011, 07:50 AM
Vissa, no this was not build in to the original code. Would have to be done as custom plugin code, put isn't too advanced.
AusPhotography
12-11-2011, 08:13 PM
I'm had a PM dialogue with Sakera ... he will post my 4.1.7+ code in the main product header :up:
compuminus
01-04-2012, 05:12 PM
The version 4.1.7/1.5 update breaks forum rendering for me. I had to uninstall and then re-install the older version. I see that a <ul class="checkradio group"> tag was added without a corresponding </ul> closing tag...could this be the problem?
AusPhotography
01-04-2012, 10:37 PM
The UL tag is closed, have a look at the code.
Something else must be happening.
It works fine for me on 4.1.8 (and did on 4.1.7).
BTW the code is <ul class="group checkradio rightcol"> -- check what was downloaded?
squidsk
01-13-2012, 08:32 PM
When view the poll with results hidden the text the results are hidden is not lined up with the poll option, but are offset down from it. I've checked this on firefox, IE, and chrome with 4.1.8. Aside from that it works great.
EDIT: It would also be nice if the results are hidden text was shown only once per poll instead of once per option.
OcR Envy
01-30-2012, 03:50 PM
I like this. I suggest that you add the option "show results once a user has voted". that's a pretty common setting.
This is really what I am looking for as well. I looked at the code posted but I don't want to over write the other options I just want this option added. Let's see it!
speedracer68
03-20-2012, 08:46 PM
Has anyone tested it on 4.1.10?
AusPhotography
03-20-2012, 10:20 PM
All good on 4.1.10
speedracer68
03-21-2012, 12:00 AM
Bummer!
I just installed in in 4.1.10 and it does not show up in the poll settings. I checked and it's installed but the options for hiding the results are not there.
Any thoughts?
mitch84
03-21-2012, 05:25 AM
work fine on vb4.1.11
speedracer68
03-21-2012, 05:00 PM
Bummer!
I just installed in in 4.1.10 and it does not show up in the poll settings. I checked and it's installed but the options for hiding the results are not there.
Any thoughts?
I wonder if it's due to some other mods or the style?
speedracer68
03-21-2012, 06:22 PM
Or maybe I missed a setting where I need to turn it on?
squidsk
03-22-2012, 03:03 PM
Which version of the mod did you grab. You need to install the 1.5 version, not the 1.4 version.
speedracer68
03-22-2012, 03:51 PM
Whoops! I will try that now.
speedracer68
03-22-2012, 04:45 PM
I feel like such an idiot at times. That was it.
Does anyone know how the time is picked when it ends and reveals the results? Is it based on the poll creation time or??? I am trying to get it to release at 8am California time.
Nirjonadda
03-22-2012, 08:39 PM
Installed but where admin panel options ?
speedracer68
03-22-2012, 08:44 PM
There are none. You see the options when you create a poll.
stemmy
03-29-2012, 08:54 AM
How do i remove mods & supermods from seeing the results ??
I want just Admins to see the results.
Paul.
05-12-2012, 02:45 AM
For me, I use ''Show Poll in Forum SideBlock (https://vborg.vbsupport.ru/showthread.php?t=266481&page=7&highlight=Polls)'' but the results are shown to guests. Is there any way to fix that?
DirtRider
01-10-2013, 11:04 AM
How do i remove mods & supermods from seeing the results ??
I want just Admins to see the results.
I asked if this could be done some time back but nothing as yet
CentralGarrison
03-27-2013, 10:29 PM
Still no version that works in 4.2? I agree that this should be standard in VB. I'm disappointed that I paid for a product that has less functionality and options that the free stuff.
mitch84
03-28-2013, 11:43 AM
yes, work fine with vb4.2.0pl3
Gord Lacey
06-05-2013, 10:13 PM
Is there a way to edit this to grant another usergroup the ability to view the poll results? I'm fine hard-coding it into the plugin if that's the only way to do it, I just don't know what I'd add, or where to add it.
Thanks!
GrnEyedDvl
04-10-2015, 12:05 AM
For me, I use ''Show Poll in Forum SideBlock (https://vborg.vbsupport.ru/showthread.php?t=266481&page=7&highlight=Polls)'' but the results are shown to guests. Is there any way to fix that?
It works that way in the CMS too, but its not just guests. Anyone that doesn't have permission to vote on the poll just sees the results. If you create a group that doesn't have permission to vote on polls you will see what I mean.
Sakera, any way to get that changed?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.