Polls Made Simple: Can't Close Polls

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am
Location: USA

Polls Made Simple: Can't Close Polls

Post by Ziggywigged »

Hello,

I'm using CMSMS 1.2.5 and polls MS 0.2.0. I just closed 2 polls in the admin and it seemed successful but they are not closed on the front-end. You can still vote but admin has them labeled as closed.

Any suggestions greatly appreciated. Thanks.
Take a penny, leave a penny.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Polls Made Simple: Can't Close Polls

Post by Nullig »

Is caching turned off for those pages?

Nullig
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am
Location: USA

Re: Polls Made Simple: Can't Close Polls

Post by Ziggywigged »

No. Both polls are on the same page and the page is 'Cachable'.
Take a penny, leave a penny.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Polls Made Simple: Can't Close Polls

Post by Nullig »

Try making the page not cacheable.

Nullig
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am
Location: USA

Re: Polls Made Simple: Can't Close Polls

Post by Ziggywigged »

Just tried and they're still open. Even looked at the db entries for both polls and both have a value '1' for 'closed'.
Take a penny, leave a penny.
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am
Location: USA

Re: Polls Made Simple: Can't Close Polls

Post by Ziggywigged »

Anyone else experience this issue? Still can't get them to close.
Take a penny, leave a penny.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Polls Made Simple: Can't Close Polls

Post by Nullig »

I noticed a few bugs in the forge for that version of Polls. Try the earlier one, it might work better.

Nullig
mydom
Forum Members
Forum Members
Posts: 15
Joined: Thu Jul 09, 2009 4:21 pm

Re: Polls Made Simple: Can't Close Polls

Post by mydom »

Hey there,

got the same problem with closing polls. Here is how to fix it:

Open action.default.php
search for:

Code: Select all

$q="SELECT id FROM ".cms_db_prefix()."module_polls WHERE poll_id = ? ORDER BY createtime DESC";
and replace it with:

Code: Select all

$q="SELECT id,closed FROM ".cms_db_prefix()."module_polls WHERE poll_id = ? ORDER BY createtime DESC";

then search:

Code: Select all

if ($this->UserAlreadyVoted($pollid)) {
and replace with:

Code: Select all

if (($this->UserAlreadyVoted($pollid)) or ($row["closed"]==1)) {
Now all polls wich are closed are not votable anymore because the results are shown.
Post Reply

Return to “Modules/Add-Ons”