Quote:
Originally Posted by smirkley
To give you an idea what I am trying to do, is display this in my vBadvanced module for polls, on my CMPS pages.
I have been working with Brian at vBa and he suggested that these polls dont show up because they are in effect "closed" to vBa CMPS.
If I can figure out why they appear as closed, then I can resolve the issue of getting them to show up on a CMPS poll module.
Thanks again.
smirkley
|
I did closed the poll at initialisation in the cron file.
"upload/include/cron/nominate_topic_cron.php"
Code:
$active = 0;
...
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "poll (question,dateline,options,votes,active,numberoptions,timeout,multiple,voters,public,lastvote) VALUES ('$question','$now','$Choice','$votes','$active','$numberoptions','$timeout','$multiple','$voters','$public','$lastvote')");
You can also activate it in the file located at:
"upload/include/functions_nominate_topic.php"
Find all
Code:
$vbulletin->db->query_write("UPDATE `" . TABLE_PREFIX . "poll` SET `options`='$choices', `votes`='$votes', `numberoptions`='$numberoptions' , `voters`='$voters', `lastvote`='$lastvote' WHERE `pollid` = '$poll_id'");
replace by
Code:
$active = 1;
$vbulletin->db->query_write("UPDATE `" . TABLE_PREFIX . "poll` SET `options`='$choices', `votes`='$votes', `active`='$active', `numberoptions`='$numberoptions' , `voters`='$voters', `lastvote`='$lastvote' WHERE `pollid` = '$poll_id'");
I could not find a proper way to prevent users to vote via the "Nomination Thread" once the poll is set to the active status.
Let me know if you succeed in it.