Polls Made Simple 0.2.0 - how deactivate poll?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
bunak
Forum Members
Forum Members
Posts: 75
Joined: Mon Sep 10, 2007 1:58 pm

Polls Made Simple 0.2.0 - how deactivate poll?

Post 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
Last edited by bunak on Fri Jan 04, 2008 2:19 pm, edited 1 time in total.
bunak
Forum Members
Forum Members
Posts: 75
Joined: Mon Sep 10, 2007 1:58 pm

Re: Polls Made Simple 0.2.0 - how deactivate poll?

Post 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  ;)
Signex

Re: Polls Made Simple 0.2.0 - how deactivate poll?

Post by Signex »

Just tested this with:

CMSMS 1.5.1
AjaxMadeSimple 1.6
Polls 0.2.2

Still works, thanks!
stevew
Forum Members
Forum Members
Posts: 74
Joined: Wed May 21, 2008 7:02 am

Re: Polls Made Simple 0.2.0 - how deactivate poll?

Post 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
Amancham

Re: Polls Made Simple 0.2.0 - how deactivate poll?

Post 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?
Post Reply

Return to “CMSMS Core”