PDA

View Full Version : Voter Turnout


filburt1
04-25-2003, 10:00 PM
This hack displays, as a percentage, the voter turnout in a poll. 0% means nobody participated, 100% means everybody voted. It assumes that only registered users can vote.

This hack adds a single query to showthread for threads where the poll results are being shown and there is at least one vote.

filburt1
04-25-2003, 11:11 PM
Screenshot:

Brad
04-25-2003, 11:38 PM
Very nice :)

Red Blaze
04-26-2003, 12:02 AM
very nice indeed. Will install. :D

if ($showresults OR $uservoted OR $cantvote) {

where is that in showthread.php? o.o?

Koutaru
04-26-2003, 12:18 AM
Interesting hack -- still thinking whether I should use it but nice none the less

filburt1
04-26-2003, 12:18 AM
Today at 09:02 PM Sonikku said this in Post #4 (https://vborg.vbsupport.ru/showthread.php?postid=387177#post387177)
very nice indeed. Will install. :D

if ($showresults OR $uservoted OR $cantvote) {

where is that in showthread.php? o.o?


It's in my mostly stock 2.3.0 showthread.php.

Marzas
04-26-2003, 12:42 AM
good work filburt1, seems that not all Evil Shelled Dictator relese crap hacks, anyway, good work.

*marzas installs this great hack

Red Blaze
04-26-2003, 02:58 AM
Well I searched in my 2.3.0 vbtesting software and it's not even there either. =S Oh well. =/

Boofo
04-26-2003, 03:04 AM
Filburt1, I show 11.76% on 2 polls and one of them has 5 voters in it and the other one has 4. Also, you need to clarify that the code goes after the first instance of if ($showresults OR $uservoted OR $cantvote) {. There are 2 of them.

all-the-vb
04-26-2003, 08:23 AM
Nice hack

:nervous:

Dean C
04-26-2003, 11:55 AM
Good idea filburt :)!

- miSt

irn-bru
04-26-2003, 05:15 PM
I assume it's ok to use.
if ($showresults or $uservoted) {
in 2.2.9 ?

filburt1
04-27-2003, 08:30 PM
Yesterday at 12:04 AM Boofo said this in Post #9 (https://vborg.vbsupport.ru/showthread.php?postid=387233#post387233)
Filburt1, I show 11.76% on 2 polls and one of them has 5 voters in it and the other one has 4. Also, you need to clarify that the code goes after the first instance of if ($showresults OR $uservoted OR $cantvote) {. There are 2 of them.


Instructions updated.

It should work flawlessly; all it does is get the number of votes from the poll table and then the number of users from the user table and divide them.

Boofo
04-27-2003, 08:55 PM
The one I am having trouble with is a multiple choice poll (where you can pick more than one answer).

Boofo
05-05-2003, 07:12 AM
Filburt, did you get a chance to look at this for multiple vote polls?

flup
05-05-2003, 07:34 AM
Nice hack :))

msimplay
05-06-2003, 05:52 PM
thank u since no one actually takes the time to vite it makes polls useless so now people can actually tell how many people have voted, it can be used against em now :D