PDA


View Full Version : Small problem with multiple poll modules.


neverstop
12-10-2007, 03:44 PM
Hi,

I have used the admincp to "copy" the current poll module 8 times so there are 9 separate poll modules (each one using a separate corresponding forum). Everything seems to work, but there is a small issue with the poll results. After voting on a poll, the option you have voted for is italicized in the poll results. With multiple polls on the page, every poll after the first one has the worng options italicized.

So if I voted for the first option in Poll 1, and the second option in Poll 2, the results for Poll 2 have both the first and second options italicized. If i voted for the fifth option in Poll 3 the 1st 2nd and 5th option are all italicized.

I hope that made sense.

Cheers,
Ian

Brian
12-10-2007, 04:24 PM
Thank you for pointing this out. If you will look in your modules/currentpoll.php file for this line:
$uservote = array();

Remove it from there, and paste it just above this line instead:
if (!$mods['nodisplay'])

And that should take care of the issue.

neverstop
12-10-2007, 04:36 PM
Thanks Brian.

PS. While I am editing the file, do you think its a good idea to make this change?

http://www.vbadvanced.com/forum/showthread.php?t=25624

Brian
12-11-2007, 12:15 PM
You would also need to run this query if you do.
ALTER TABLE `poll` ADD INDEX ( `dateline` )