vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [HTL] and [Normal] Hide Poll Results (https://vborg.vbsupport.ru/showthread.php?t=63576)

JamesFrost 11-02-2004 02:52 PM

Quote:

Originally Posted by JamesFrost
ignore me - just read the readme

installed - works brilliantly. Many thanks. :D

Kamran 11-20-2004 02:49 PM

Hi,

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'] * 1002);
            }

            
$option['graphicnumber'] = $option['number'] % 1;
            
$option['barnumber'] = round($option['percent']) * 2

Any suggestions?

Thanks.

TheMusicMan 11-20-2004 03:34 PM

I have also found a bug in this....

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.

Kamran 11-20-2004 04:32 PM

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?

Thanks.

ambumann 02-03-2005 08:05 PM

Great hack, installed right away!

ambumann 02-04-2005 02:45 PM

Is it possible to add an option to this mod to let the users see the results after they have voted?

pjk 03-20-2005 06:32 AM

Today I'm install this hack to vbulletin 3.0.6 and found this paragraph might need update

Quote:

pollresults_table TEMPLATE
==========================

FIND:

<td class="tfoot" colspan="4" align="center"><span class="smallfont">$vbphrase[voters]: <strong>$pollinfo[numbervotes]</strong>. $pollstatus</strong></td>

REPLACE WITH:

<if condition="$noshow == 0">
<td class="tfoot" colspan="4" align="center"><span class="smallfont">$vbphrase[voters]: <strong>$pollinfo[numbervotes]</strong>. $pollstatus</strong></td>
</if>
<if condition="$noshow == 1">
<td class="tfoot" colspan="4" align="center"><span class="smallfont"><strong>$vbphrase[hidden_poll_footer]<br>$pollstatus</strong></td>
</if>
should it be
Quote:

pollresults_table TEMPLATE
==========================

FIND:

<td class="tfoot" colspan="4" align="center"><span class="smallfont"><if condition="$show['multiple']">$vbphrase[multiple_choice_poll] </if>$vbphrase[voters]: <strong>$pollinfo[numbervotes]</strong>. $pollstatus</span></td>

REPLACE WITH:

<if condition="$noshow == 0">
<td class="tfoot" colspan="4" align="center"><span class="smallfont"><if condition="$show['multiple']">$vbphrase[multiple_choice_poll] </if>$vbphrase[voters]: <strong>$pollinfo[numbervotes]</strong>. $pollstatus</span></td>
</if>
<if condition="$noshow == 1">
<td class="tfoot" colspan="4" align="center"><span class="smallfont"><strong>$vbphrase[hidden_poll_footer]<br>$pollstatus</strong></td>
</if>

pjk 03-20-2005 07:36 PM

Quote:

Originally Posted by ambumann
Is it possible to add an option to this mod to let the users see the results after they have voted?

Here :)
Quote:

pollresults_table TEMPLATE
==========================
FIND:

<td class="tfoot" colspan="4" align="center"><span class="smallfont"><if condition="$show['multiple']">$vbphrase[multiple_choice_poll] </if>$vbphrase[voters]: <strong>$pollinfo[numbervotes]</strong>. $pollstatus</span></td>

REPLACE WITH:

<if condition="$noshow == 0 || $uservoted == 1">
<td class="tfoot" colspan="4" align="center"><span class="smallfont"><if condition="$show['multiple']">$vbphrase[multiple_choice_poll] </if>$vbphrase[voters]: <strong>$pollinfo[numbervotes]</strong>. $pollstatus</span></td>
</if>
<if condition="$noshow == 1 && $uservoted == 0">
<td class="tfoot" colspan="4" align="center"><span class="smallfont"><strong>$vbphrase[hidden_poll_footer]<br>$pollstatus</strong></td>
</if>
Quote:

showthread.php
======================
FIND:

if ($value == 0)
{
$option['percent'] = 0;
}
else
{
$option['percent'] = vb_number_format($value / $pollinfo['numbervotes'] * 100, 2);
}

REPLACE WITH:

// Start Hide Poll Results v1.0
if ($value == 0 || $noshow == 1 && $uservoted == 0)
{
$option['percent'] = 0;
$option['votes'] = 0;
}
else
{
$option['percent'] = vb_number_format($value / $pollinfo['numbervotes'] * 100, 2);
}
// End Hide Poll Results v1.0

Hurricane 04-05-2005 01:02 PM

Sorry all. I have been away for a bit. I will get this updated ASAP.

Hurricane 04-05-2005 06:40 PM

Updated to work with 3.0.7.

Thanks pjk for the fix. ;)


All times are GMT. The time now is 01:31 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.01254 seconds
  • Memory Usage 1,754KB
  • 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_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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