Previous Thread
Next Thread
Print Thread
Hop To
[FIXED for 7.0.2] Start time of polls always enforced #168155 11/12/2006 8:02 AM
Joined: Sep 2004
Posts: 152
Yomar Offline OP
member
OP Offline
member
Joined: Sep 2004
Posts: 152
For polls on these forums, you can define a voting start and stop time. We just found out that when you create a poll on these forums and disable the start time, it will enforce a start time anyway of 12 PM the next day. This means that once you have posted a poll, it will take up to 24 hours until people can actually start voting.

This is clearly a bug.

The only workaround is to enable a start time and set it to the current time.

Last edited by Rick; 11/22/2006 6:31 PM.
Re: Start time of polls always enforced [Re: Yomar] #168221 11/13/2006 2:30 PM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
scripts/pollmanager.inc.php

Line 114 has a block of code that looks like this:

Code
if ($enablestart) {
   $starttime = mktime($hour,$min,0,$month,$day,$year);
} else {
   $starttime = mktime(12,0,0,$month,$day,$year);
} 
$validstart = checkdate($month,$day,$year);  
if (!$validstart) { 
   $html -> not_right("{$ubbt_lang['INVALID_START']}");
} 


Change that, to this:

Code
if ($enablestart) {
   $starttime = mktime($hour,$min,0,$month,$day,$year);
   $validstart = checkdate($month,$day,$year);
   if (!$validstart) {
      $html -> not_right("{$ubbt_lang['INVALID_START']}");
   }
} else {
   $starttime = $html->get_date();
} 



Re: Start time of polls always enforced [Re: Rick] #168267 11/14/2006 4:17 AM
Joined: Sep 2004
Posts: 152
Yomar Offline OP
member
OP Offline
member
Joined: Sep 2004
Posts: 152
Hi Rick,

That doesn't work smile

The start time is now indeed (5 secs ago) or (32 secs ago), but the button still says: Voting not accepted until starting time begins (and it indeed doesn't accept any votes).

Last edited by Yomar; 11/14/2006 4:19 AM.
Re: Start time of polls always enforced [Re: Yomar] #168317 11/15/2006 3:30 AM
Joined: Jul 2006
Posts: 4,062
Mark S Offline
Offline
Joined: Jul 2006
Posts: 4,062
Hi,
i havnt done any fixes or anything,
and i'm using v7.01

If you create a poll and on the last page of options
only click users must vote before results can be seen.

I get you can not vote until the vote time begins,
and its always 12pm the same day ?

Ive done 2 polls not and 3hrs apart.
And they all say 12pm start time.

If i rememeber this was the start time,
but that option was not ticked.

Last edited by Mark S; 11/15/2006 3:34 AM.

BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Re: Start time of polls always enforced [Re: Mark S] #168368 11/16/2006 1:11 PM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
Requires another change. Line 313 of libs/includepoll.inc.php looks like:

if (time() < $pstart) {

That, should be:

if ($html->get_date() < $pstart) {

Re: Start time of polls always enforced [Re: Rick] #168369 11/16/2006 1:59 PM
Joined: Jun 2006
Posts: 956
Zarzal Offline
Old Hand
Offline
Old Hand
Joined: Jun 2006
Posts: 956
line 313? Do you mean line 122?


my board: http://www.dragonclan-forum.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen
Re: Start time of polls always enforced [Re: Zarzal] #168371 11/16/2006 2:11 PM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
Yeah, guess I did...dunno where line 313 came from crazy


Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Who's On Line Issue
by Larry Miller - 09/21/2019 9:37 PM
ubb.threads 7.7.3 install error on create tables
by andrewjs18 - 09/17/2019 3:39 AM
Horizontal Image Attachment
by ECNet - 09/11/2019 12:17 PM
user profile, after I click Update nothing happens
by PianoWorld - 09/10/2019 12:38 PM
Who's Online Now
0 registered members (), 18 guests, and 135 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.3