PDA

View Full Version : Random poll displayed


Kesomir
08-12-2004, 12:42 PM
This hack will change the poll that is displayed on your homepage from the most recent to a random one.


OPEN modules/currentpoll.php

FIND


$query['pollquery'] = 'AND forumid IN(' . $vba_option ['portal_poll_forumid'] . ') ORDER BY poll.pollid DESC';


REPLACE WITH


$query['pollquery'] = 'AND forumid IN(' . $vba_option ['portal_poll_forumid'] . ') ORDER BY RAND()';


SAVE AND UPLOAD

That's it, you're done.

Enjoy.


EDIT - just did a search and found this already exists - doh! should have done that first :P

KW802
08-12-2004, 01:11 PM
Um.... how is this different from entering RAND as the "Polls Forum ID" value?

Our Sponsors
 

Kesomir
08-12-2004, 05:03 PM
it draws a random poll from your specified forum.

entering RAND in forum id draws random poll from ALL forums.

KW802
08-12-2004, 05:04 PM
it draws a random poll from your specified forum.

entering RAND in forum id draws random poll from ALL forums.
AH, OK, now that would make more sense. :p

Our Sponsors
 

DMC
09-20-2004, 01:26 AM
I'm getting polls pulled from years ago, is there a way to set this feature for only polls posted in the last x days? 30 or 60?

I've got a 'real' time sort of site (auto racing related) and pulling a poll from 2002 at Daytona and who will win is silly... :D

moses
05-06-2005, 08:44 AM
is there a way to make it show unanswered polls first?
such as
order by answered, RAND
or something like that?

moses
05-26-2005, 08:56 AM
anyone?