Kesomir
08-13-2004, 11:31 AM
ok after my mistake yesterday I actually used the search function first this time ;) and this hack isn't around as far as I could find.
What it does is to only pull polls to the portal if they are active, ie: not closed
OPEN forum/modules/currentpoll.php
FIND line 33
WHERE open <> 10 AND thread.pollid != 0 AND visible = 1 $notdeleted $query[pollquery]
REPLACE WITH
WHERE open <> 10 AND thread.pollid != 0 AND visible = 1 AND active = 1 $notdeleted $query[pollquery]
SAVE and UPLOAD.
This will work for any poll setting, but is particuarly useful on the RAND setting or the random poll hack to stop loads of old closed polls being dredged up.
Brian did say that he reckons adding more to this query may show a performance hit on larger websites. Shouldn't be an issue for smaller ones though even if this is the case.
What it does is to only pull polls to the portal if they are active, ie: not closed
OPEN forum/modules/currentpoll.php
FIND line 33
WHERE open <> 10 AND thread.pollid != 0 AND visible = 1 $notdeleted $query[pollquery]
REPLACE WITH
WHERE open <> 10 AND thread.pollid != 0 AND visible = 1 AND active = 1 $notdeleted $query[pollquery]
SAVE and UPLOAD.
This will work for any poll setting, but is particuarly useful on the RAND setting or the random poll hack to stop loads of old closed polls being dredged up.
Brian did say that he reckons adding more to this query may show a performance hit on larger websites. Shouldn't be an issue for smaller ones though even if this is the case.