vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Show poll results in descending order (https://vborg.vbsupport.ru/showthread.php?t=82660)

Andreas 06-07-2005 10:00 PM

Show poll results in descending order
 
Description
With this hack poll results will be shown in descending order by number of votes, instead of being ordered by the options (as they were entered).

Details
Files to modify: 2
Deficullty: Easiest

History
1.00 Initial Version
1.01 Updated installation instructions to point to the exact place in poll.php
1.02 Fixed a Bug that caused wrong votes

dsboyce8624 06-08-2005 12:38 AM

So the winner is on top?

Works for me.

Andreas 06-08-2005 12:42 AM

Yes.

Example
Without this Hack
Option1 2 20%
Option2 1 10%
Option3 3 30%
Option4 4 40%

With this Hack
Option4 4 40%
Option3 3 30%
Option1 2 20%
Option2 1 10%

dsboyce8624 06-08-2005 01:20 AM

Sweet.

iSpanish 06-08-2005 01:27 AM

Nice job

Good hack

thanks KirbyDE


Marboosh

Guest190829 06-08-2005 01:38 AM

Woah Kirby, you're on fire with hack releases.

/me clicks install.

TTG 06-08-2005 03:20 AM

Cool .. quick .. simple and it works :)

Clicked install

bigcurt 06-08-2005 03:38 AM

Roger that easy install


[high]* bigcurt installs
[/high]


[high]* bigcurt thanks Mr. Kirby :).[/high]

FleaBag 06-08-2005 02:52 PM

Very nice, thanks a lot. There were 3 references to the code in poll.php - I just added the hack under the first one and all seems to be working well. :)

Andreas 06-08-2005 02:58 PM

@FleaBag
Unfortunately this is not the correct place.
Instructions updated, thank you.

FleaBag 06-08-2005 04:05 PM

Oh, thanks! Hehe... It worked for me though? I will amend mine...

dsboyce8624 06-08-2005 04:42 PM

Dude, update emails!!!!

I have 60 hacks installed. Hard to keep up.

Thanks for the work.

dsboyce8624 06-10-2005 10:13 PM

Seem to be having poll issues now, votes cast don't always show for the right choice.

Very strange.

Lionel 06-12-2005 02:46 AM

I had to uninstall. All new votes went to first question, regardless of option chosen.

Andreas 06-12-2005 02:55 AM

Quote:

Originally Posted by Lionel
I had to uninstall. All new votes went to first poll, regardless of option chosen.

Not really.
The problem was that, if you vote for a poll, the poll options were presented in the order of the current poll results, but were saved in the original order - which caused wrong votes.
Sorry for that, didn't notice this problem in first place.
Should be working now.

Lionel 06-12-2005 03:07 AM

Appears to have been fixed. Reclicked install.

dsboyce8624 06-12-2005 04:35 AM

Thanks man, might wanna add a section in there on removing the old parts for those of us too stoopid to keep the old file.

FleaBag 06-14-2005 04:30 PM

Thanks for the fix! My members were telling me the polls were messed up but I was denying there was any problem... Until I checked this thread lol. Cheers. :)

kash2k 07-28-2005 05:28 PM

Fantastic :up:

GuaRRand 01-05-2006 04:18 PM

is this up for 3.5 also??
I'd really liike to have this for 3.5

Traxdata 02-14-2006 05:33 PM

Works fine with vB 3.5.2 / 3.6 GOLD !

MotMann 08-30-2006 09:25 AM

Thank's.. works with vB 3.6 :)

voter 01-19-2007 01:51 PM

Quote:

Originally Posted by MotMann (Post 1063959)
Thank's.. works with vB 3.6 :)

I did it in 3.6.4

You can't FIND do it for specific template looking in SHOWTREAD via admincp
There are difference between Showthread template accessed via AdminCP and showthread.php in home directory of forum.

The last one effects on all styles and must be edited via editor, better use any php editor to be sure that you didn't make code errors.

Installed.

voter 01-19-2007 02:48 PM

Andreas, how about sorting also before the user give his vote?

mostadeef 10-29-2007 09:17 PM

I had to say, Thank you :)


All times are GMT. The time now is 06:35 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.01103 seconds
  • Memory Usage 1,752KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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