db_query("DELETE FROM poll_choices WHERE nid='".$node->nid."'");
}
}
functionpoll_get_choices_array($poll){
if(!is_array($poll[choice])){
$result=db_query("SELECT * FROM poll_choices WHERE nid='".$poll[nid]."'");
...
...
@@ -78,7 +85,9 @@ function poll_search($keys) {
functionpoll_help(){
?>
<i>No help available.</i>
<p>Poll.module allows you to run simple multiple choice polls on your site. After creating the necessary categories, you can add a poll through this administration interface.</p>
<p>The poll.module also has a block to show the latest poll. If you combine it with a poll category that doesn't promote to the mainpage, you'll get a side-block only poll system.</p>
<p>If you want to set a limit on the duration of a poll, use the <i>Poll Duration</i> setting. After the specified interval, the poll will automatically be closed, preventing anymore voting.</p>
$form.=form_select(t("Number of choices"),"choices",$choices,$opts,t("This box specifies the number of choiceboxes in this form, it doesn't affect the actual amount of choices in the poll."));
$form.=form_submit(t("Refresh"))."<br><br><br>";
$form.=form_select(t("Number of choices"),"choices",$choices,$opts,t("This box only specifies the number of boxes in this form, it doesn't have to equal the actual amount of choices in the poll."));
$blocks[0][content]=$output?$output:"No active polls.";
$blocks[0][info]="Display the latest active poll.";
$blocks[0][info]="Latest active poll.";
$blocks[0][link]="index.php";
return$blocks;
}
functionpoll_query($type=""){
global$status;
$queries=array(array("recent polls","WHERE n.type = 'poll' ORDER BY n.timestamp DESC"),array("active polls","WHERE n.type = 'poll' AND n.status = '$status[posted]' ORDER BY n.timestamp DESC"),array("queued polls","WHERE n.type = 'poll' AND n.status = '$status[queued]' ORDER BY n.timestamp DESC"),array("dumped polls","WHERE n.type = 'poll' AND n.status = '$status[dumped]' ORDER BY n.timestamp DESC"),array("polls without category (integrity)","WHERE n.type = 'poll' AND n.cid = '0' ORDER BY n.timestamp DESC"),array("polls without topic (integrity)","WHERE n.type = 'poll' AND n.tid = '0' ORDER BY n.timestamp DESC"));
db_query("DELETE FROM poll_choices WHERE nid='".$node->nid."'");
}
}
functionpoll_get_choices_array($poll){
if(!is_array($poll[choice])){
$result=db_query("SELECT * FROM poll_choices WHERE nid='".$poll[nid]."'");
...
...
@@ -78,7 +85,9 @@ function poll_search($keys) {
functionpoll_help(){
?>
<i>No help available.</i>
<p>Poll.module allows you to run simple multiple choice polls on your site. After creating the necessary categories, you can add a poll through this administration interface.</p>
<p>The poll.module also has a block to show the latest poll. If you combine it with a poll category that doesn't promote to the mainpage, you'll get a side-block only poll system.</p>
<p>If you want to set a limit on the duration of a poll, use the <i>Poll Duration</i> setting. After the specified interval, the poll will automatically be closed, preventing anymore voting.</p>
$form.=form_select(t("Number of choices"),"choices",$choices,$opts,t("This box specifies the number of choiceboxes in this form, it doesn't affect the actual amount of choices in the poll."));
$form.=form_submit(t("Refresh"))."<br><br><br>";
$form.=form_select(t("Number of choices"),"choices",$choices,$opts,t("This box only specifies the number of boxes in this form, it doesn't have to equal the actual amount of choices in the poll."));
$blocks[0][content]=$output?$output:"No active polls.";
$blocks[0][info]="Display the latest active poll.";
$blocks[0][info]="Latest active poll.";
$blocks[0][link]="index.php";
return$blocks;
}
functionpoll_query($type=""){
global$status;
$queries=array(array("recent polls","WHERE n.type = 'poll' ORDER BY n.timestamp DESC"),array("active polls","WHERE n.type = 'poll' AND n.status = '$status[posted]' ORDER BY n.timestamp DESC"),array("queued polls","WHERE n.type = 'poll' AND n.status = '$status[queued]' ORDER BY n.timestamp DESC"),array("dumped polls","WHERE n.type = 'poll' AND n.status = '$status[dumped]' ORDER BY n.timestamp DESC"),array("polls without category (integrity)","WHERE n.type = 'poll' AND n.cid = '0' ORDER BY n.timestamp DESC"),array("polls without topic (integrity)","WHERE n.type = 'poll' AND n.tid = '0' ORDER BY n.timestamp DESC"));