vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Poll Voting Percentage Problem (https://vborg.vbsupport.ru/showthread.php?t=282276)

hasidoo 05-01-2012 10:00 AM

Poll Voting Percentage Problem
 
1 Attachment(s)
Hi all,

In my forum,when someone voted in a multiple choice poll, it displays as follows;
Attachment 138135

The percentages are allocated as 100% for each option.

But I need it to be like this:
Attachment 138136

(i.e. as an overall percentage for the whole poll)

I guess my problem is clear to all of you. Anyone knows how to get the result I wanted? Please help me with this..

kh99 05-01-2012 07:03 PM

I think all you need to do is find this block of code:

Code:

else if ($pollinfo['multiple'])
{
        $option['percentraw'] = ($value < $pollinfo['voters']) ? $value / $pollinfo['voters'] * 100 : 100;
}


and remove it or comment it out (by putting // at the beginning of each line). Unfortunately for some reaosn it appears in three different files: poll.php, showthread.php, and forumrunner/get_thread.php (assuming you have vb4.1.12 or later), so it needs to be done in each place.

hasidoo 05-07-2012 03:41 PM

Quote:

Originally Posted by kh99 (Post 2325329)
I think all you need to do is find this block of code:

Code:

else if ($pollinfo['multiple'])
{
        $option['percentraw'] = ($value < $pollinfo['voters']) ? $value / $pollinfo['voters'] * 100 : 100;
}


and remove it or comment it out (by putting // at the beginning of each line). Unfortunately for some reaosn it appears in three different files: poll.php, showthread.php, and forumrunner/get_thread.php (assuming you have vb4.1.12 or later), so it needs to be done in each place.

thank you very much. I'll try this

hantousha 04-22-2014 03:53 PM

Great. Fix Works to fix the issue with VB 3.8 percentage calculation in multiple votes. When the Mod Multiple Votes is installed.


All times are GMT. The time now is 02:22 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.01001 seconds
  • Memory Usage 1,719KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete