Version: 1.1, by Hurricane
Developer Last Online: Sep 2022
Version: 3.0.7
Rating:
Released: 04-06-2004
Last Update: 04-04-2005
Installs: 35
DB Changes
No support by the author.
Hide Poll Results Version: V1.1 vB-version: 3.0.7 Developer: Glenn H. Shelton III Install difficulty: Medium File edits: 12 Template edits: 3
History & Hack Information
==========================
First of all, MAJOR credit goes to Firefly and Scott MacVicar for the original creation of this hack in VB2.
I attempted to just port this over to VB3, but that did not quite happen. Most of it was rewritten, but I could not have done it without the VB2 hack as a guide.
What is Hide Poll Results ver 1?
This hack allows you to choose whether or not you want the results of your poll displayed while the polls are open. It only allows the original poll poster, admins and mods of that form to view the results of the poll and none of the regular users. They can only view the poll if the poll is closed either by a admin/mod or the poll ends.
Testing
=======
Tested on vBulletin 3.0.0 Gold, across multiple hacked and unhacked installations.
Updated For vBulletin 3.0.7 on 04/05/2005
Thanks to
=========
Firefly and Scott MacVicar for the original VB2 version and the idea.
68 Z-28 for making the request for a VB3 version.
Boofo for telling me to make it happen.
pjk for the changes to the pollresults_table TEMPLATE
About me
========
This is my first public hack release. It seems all the good ideas for VB2 had already been done by the time I got there. I am not new to php and MySQL however and I hope this is not my last release.
HACK INSTALLATION DETAILS: Files modified for this Hack:
poll.php
showthread.php
Templates modified for this Hack:
editpoll
newpoll
pollresults_table
DB Tables modified for this Hack:
poll
New DB columns for this Hack:
hidepoll
HACK UPGRADE DETAILS:
See the install file for the sections of:
Poll.php
FIND: (Around Line 677)
showthread.php
FIND: (Around Line 653)
pollresults_table TEMPLATE
No other changes were made from V1 to V1.1
Support is available in this thread only.
As always, if you install, please click the install button.
I've installed the hack, but when I click on any thread I get the following error:
Quote:
Parse error: parse error, unexpected T_ELSE in /home/talkwres/public_html/forum/showthread.php on line 649
Heres that part of the code from the file:
PHP Code:
//Now we check if the user has voted or not
if ($showresults OR $uservoted)
{ // user did vote or poll is closed if ($value == 0 || $noshow == 1)
{
$option['percent'] = 0;
$option['votes'] = 0;
}
else //line 649//
{
$option['percent'] = vb_number_format($value / $pollinfo['numbervotes'] * 100, 2);
}
I installed onto vB303 which works fine except that when using vBadvanced and one has a random poll pulled into the portal page... if you have chosen to hide the results of this poll that is displayed on portal, you still see the bitmap and hence users can see the results of a poll which should be hidden.
OK - I re-did the showthread file, and it seems to work now
Just a quick question - is there a way to stop moderators seeing the results also - or have it so that the only way to see the results is through the admin panel - until the poll closes?