PDA


View Full Version : Poll Problem


cLord
05-16-2004, 02:08 AM
When a poll has more then 6 possible answers then the image paths are wrong!

The /images/polls/ dir only contains bar1.gif to bar6.gif
CMPS searches for bar7.gif, bar8.gif...

cLord ;)

Brian
05-16-2004, 11:56 AM
Ahhh, gotta love simple little mistakes. Moving this to the bugs forum.

For the fix, open your forum/modules/currentpoll.php and look for:

$option['graphicnumber'] = $key + 1 % 6 + 1;

Replace that with:

$option['graphicnumber'] = ($key + 1) % 6 + 1;

And that should fix the problem. :)

cLord
05-16-2004, 02:54 PM
ThanX Brian!

Applied the fix and it works fine now...

cLord :)

nineball
05-16-2004, 09:58 PM
That fixed the bar problem however the percents are wrong
look at

http://www.heartsongctr.com/vbulletin/index.php? and
then at

the actual poll


http://www.heartsongctr.com/vbulletin/poll.php?do=showresults&pollid=5

cLord
05-17-2004, 05:16 AM
It fixed the bar problem and the percents at my site are right....

cLord ;)

ogetbilo
05-17-2004, 05:20 AM
It fixed the bar problem and the percents at my site are right....

cLord ;)
they don't seem to me corrected yet:confused:

the problem is the percentage is calculated by dividing the number of votes on a poll option by the total number of voters (NOT the votes!), which is a problem when the votes are multiple choice.

What is the variable used for the total number of votes?

Brian
05-17-2004, 10:57 AM
Attached is a new currentpoll.php file. Upload that to your forum/modules directory, and then go to your Style Manager, edit your portal_poll template and look for:

$pollinfo[voters]

Replace that with:

$pollinfo[nvotes]

And that will fix the probelm. :)