vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Voter Turnout (https://vborg.vbsupport.ru/showthread.php?t=52148)

filburt1 04-25-2003 10:00 PM

Voter Turnout
 
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

PHP Code:

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

Quote:

Today at 09:02 PM Sonikku said this in Post #4
very nice indeed. Will install. :D

PHP Code:

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.
Quote:

if ($showresults or $uservoted) {
in 2.2.9 ?

filburt1 04-27-2003 08:30 PM

Quote:

Yesterday at 12:04 AM Boofo said this in Post #9
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


All times are GMT. The time now is 01:44 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.01948 seconds
  • Memory Usage 1,743KB
  • 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)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