Previous Thread
Next Thread
Print Thread
Hop To
[FIXED for 7.0.2] Start time of polls always enforced
#168155 11/12/2006 7: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 5:31 PM.
Re: Start time of polls always enforced
Yomar #168221 11/13/2006 1: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
Rick #168267 11/14/2006 3: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 3:19 AM.
Re: Start time of polls always enforced
Yomar #168317 11/15/2006 2: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 2:34 AM.

BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Re: Start time of polls always enforced
Mark S #168368 11/16/2006 12: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
Rick #168369 11/16/2006 12: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
Zarzal #168371 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
Yeah, guess I did...dunno where line 313 came from crazy


Link Copied to Clipboard
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Users cant register after upgrade to Version 7
by Jim0421 - 02/13/2020 11:32 PM
Looking for best site firewall and CDN service
by Ruben - 02/11/2020 3:01 PM
custom island shows when logged in?
by Ruben - 02/11/2020 1:54 PM
email footer issues v7.7.3
by Ruben - 02/06/2020 4:04 PM
CP Saved member Searchs error V7.7.3
by Ruben - 02/06/2020 10:38 AM
Who's Online Now
1 members (Gizmo), 84 guests, and 48 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
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.4
(Snapshot build 20200218)