View Full Version : Random Poll
Does anyone know how to have a random poll on the homepage? I want it to select any poll from the POLLs forum rather than just the latest.
thanks
Raitsa
07-01-2004, 03:01 PM
Its there already:
In Vba cmps-menu:
Poll Options
Polls Forum ID
The ID number of your polls forum. Enter 0 to disable homepage polls, or enter RAND to pull a random poll from any forum.
no, this is slightly different - I want a random poll from only one forum...
Brian
07-01-2004, 04:35 PM
In your /forum/modules/currentpoll.php find:
ORDER BY poll.pollid DESC
Replace that with:
ORDER BY RAND()
:)
Chuckie
07-01-2004, 11:10 PM
Might be a dumb ? but will this randomize only active polls?
Brian
07-02-2004, 11:15 AM
It will still pull polls that are not active and that have closed because of a time set on them. I think adding too much more to that query may create more of a server hit than it's worth (though that would mosly be an issue on larger sites), but I can give you the code if you still want it anyways.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.