Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2001
Posts: 74
Member
Member
Offline
Joined: Feb 2001
Posts: 74
I just upgraded to 6.4 full from b1 and I ran into a nasty problem. When a user posts a poll regardless if they tinker with the "Start Poll Time", the poll will not let anyone vote for 5 days. How do I fix this?


{SFP} Sonic
Expecting the Unexpected!
Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Bug. Line 1070 of addpost.php looks like this:

$starttime = $starttime - ($config['adjusttime'] * 86400);

Try changing that to this:

$starttime = $starttime - ($config['adjusttime'] * 3600);

It may need more tweaking than that, so if still doesn't let you vote until a couple of hours, let me know.


UBB.threads Developer
Joined: Feb 2001
Posts: 74
Member
Member
Offline
Joined: Feb 2001
Posts: 74
It's still off a few hours, I beleive by 8 hours.


{SFP} Sonic
Expecting the Unexpected!
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
What's your server time offset in the config file?


UBB.threads Developer
Joined: Feb 2001
Posts: 74
Member
Member
Offline
Joined: Feb 2001
Posts: 74
-4 Currently


{SFP} Sonic
Expecting the Unexpected!
Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Ok, go ahead and make this change. After this:

if ($addpoll && $questions) {

Delete everything up to the point where it says $validstart=checkdate($month,$day,$year);

And add this:

Code
<br />$starttime = "0";<br />if ($ampm == "PM") { $hour = $hour + 12; }<br />if (!$enablestart) {<br />   $starttime = mktime(0,0,0,$month,$day,$year);<br />} else {<br />   $starttime = mktime($hour,$min,0,$month,$day,$year);<br />}<br />



So, basically what you end up with is this:

Code
<br />if ($addpoll && $question) {<br />   $starttime = "0";<br />   if ($ampm == "PM") { $hour = $hour + 12; }<br />   if (!$enablestart) {<br />      $starttime = mktime(0,0,0,$month,$day,$year);<br />   } <br />   else {<br />      $starttime = mktime($hour,$min,0,$month,$day,$year);<br />   }<br />   $validstart = checkdate($month,$day,$year);<br />


UBB.threads Developer
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
So should eberyone make this change or?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I did

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
// ---------------------
// Are we adding a poll?
if ($addpoll && $questions) {
include("$thispath/addpost_newpoll.php");
}

would be nice but the inertaional version didn't have that line in the addpost.php

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Also in the international version when seting the main index to categories only.. you do not get the numbers in red like you do on Josh's Board...

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Yes It is as 6.4 so far was only released in an international version and who said anything about an INCLUDE anywhere in this?? Me thinks its coffee time.

Here is the code your searching for in addpost.php

// -------------------------------------------------
// If there is a poll in this post we need to add it
if ($addpoll && $questions) {
$starttime = "0";
if ($ampm == "PM") { $hour = $hour + 12; }
$starttime = mktime($hour,$min,0,$month,$day,$year);
$starttime = $starttime - ($config['adjusttime'] * 86400);
$validstart = checkdate($month,$day,$year);

and you replace it with this

// -------------------------------------------------
// If there is a poll in this post we need to add it
if ($addpoll && $questions) {
$starttime = "0";
if ($ampm == "PM") { $hour = $hour + 12; }
if (!$enablestart) {
$starttime = mktime(0,0,0,$month,$day,$year);
}
else {
$starttime = mktime($hour,$min,0,$month,$day,$year);
}
$validstart = checkdate($month,$day,$year);

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
And... the All Languages Version I downloaded... doesn't have that line.. in fact heres my addpost.php
Attachments
101372-addpost.zip (0 Bytes, 8 downloads)

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Just to let ya know.. I did a beyond compare and the files from and the ubbthreads-6-4-all-langs.tar.gz I downloaded on December 5th and the ubbthreads-6-4-all-langs.tar.gz I downloaded on December 8th are different... Not only is the addpost.php changed to reflect the change scream said above but they fixed the altertable.. also in the one I downloaded on the 5th there was two files one called oc_login.php and one called temp.php also in the addpost.php there was a line stripping the icons url but in the Dec 8th that is now gone..

the ubbthreads-6-4-english.tar.gz I downloaded on the 8th is the same as the ubbthreads-6-4-all-langs.tar.gz I downloaded on the 8th Minus the langauge files and it also differes from the ubbthreads-6-4-all-langs.tar.gz I downloaded on the 5th..

the one on the 5th did NOT have this line if ($addpoll && $questions) {

so in 3 days they altered the file this much...

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I would say not.

The file I am giving you the code from was downloaded Friday the fifth. I have not gone back and redownloaded any zip until Rick posts 6.4.1. The code I gave is indeed from the addpost.php on Friday. Unless that is you downloaded something after I did I know I was one of the first downloads.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
well... Im looking at two zips.. one downloaded the 5th and one downloaded last nite... so unless some Keebler Elves came in and turned on my PC and rezipped em they are different...

Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
the poll have a problem with start and stop times. I try to report it on Infopop. If you set Start time and stop time you can submit a vote bevor the poll is startet. The polls tells you that you have voted. If start time reached you are not able to vote and if stop time reached you are not able to view a result. I try this with a 5 minute test poll. Can anyone verify this ? I run an 24h system not 12am/pm


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,575
Posts293,930
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)