Page 1 of 1
Polls Made Simple 0.2.0 - how deactivate poll?
Posted: Fri Jan 04, 2008 11:19 am
by bunak
Hi,
I have installed Polls Made Simple, it works, but I can't find, how deactivate running poll. There is icon for activate/deactivate in module administration, but it doesn't work.
It seems it is version 0.2.0 error.
Thanks for your answer.
Bunak
Re: Polls Made Simple 0.2.0 - how deactivate poll?
Posted: Fri Feb 01, 2008 2:24 pm
by bunak
OK, nobody knows?
I found it is problem of Polls made simple, there is no aviabillity to deactivate poll. Function is not in package.
How You can change it?
In modules/Polls create file named
action.deactivatepoll.php and put into it this code:
Code: Select all
<?php
if (!isset($gCms) || !$this->VisibleToAdminUser()) exit;
if (!isset($params["pollid"])) exit;
$this->SetPreference("activepoll",-1);
$this->Redirect($id,"defaultadmin");
?>
Now open file named
polllist.php in text editor, go to line 50 and replace this line:
Code: Select all
//echo "<img src='themes/default/images/icons/system/true.gif' alt='Active poll' class='systemicon'>";
yes this line is commnted!!!
with this two lines:
Code: Select all
$text="<img src='themes/default/images/icons/system/true.gif' alt='Active poll' class='systemicon'>";
echo $this->CreateLink($id, "deactivatepoll",$returnid, $text, array("pollid"=>$row["id"]));
and thats all folks

Re: Polls Made Simple 0.2.0 - how deactivate poll?
Posted: Tue Dec 09, 2008 10:09 am
by Signex
Just tested this with:
CMSMS 1.5.1
AjaxMadeSimple 1.6
Polls 0.2.2
Still works, thanks!
Re: Polls Made Simple 0.2.0 - how deactivate poll?
Posted: Thu Feb 12, 2009 8:47 pm
by stevew
Not sure if by "deactivate" you mean the same as "close", but that option already exists and works OK, it's just that you have to have more than one poll active before it becomes visible (took me quite a while to work that out, too!)
HTH somebody
Re: Polls Made Simple 0.2.0 - how deactivate poll?
Posted: Fri Mar 20, 2009 8:43 am
by Amancham
Okay. Probably I'm too stupid for this, but ... what exactly does "close" do? I tried it on several polls but even if I mark them as closed in the admin panel, I still can vote.
Deactivate didn't do anything else as far as I can tell.
Is there a way to close/deactivate a poll so it's not open for voting anymore and only displays the voteresults when it is called on a site?