UBB.Dev
Posted By: Painfool Error with Sticky Threads and 5.47 - 05/22/2001 5:47 PM
After adding the hack (two times) I get syntax errors at line 1957 and 1976 the first one at the "} Else" and the other at "}" has anyone else gotten this hack working on 5.47? Author claims it has in the text file, but not sure if it had to be "modified" for it to do so. Thanks in advance smile

Mike
Posted By: LoneWolf Re: Error with Sticky Threads and 5.47 - 05/23/2001 6:12 PM
I had the same error! I think its a typo in the code...
Posted By: Jiankc Re: Error with Sticky Threads and 5.47 - 05/24/2001 8:05 AM
I've a same error as well :rolleyes:
Posted By: BassTeQ Re: Error with Sticky Threads and 5.47 - 05/25/2001 1:11 AM
Working fine on 5.47d
Posted By: LoneWolf Re: Error with Sticky Threads and 5.47 - 05/25/2001 5:48 AM
anyone?
Posted By: Jiankc Re: Error with Sticky Threads and 5.47 - 05/25/2001 12:54 PM
anyone know how to solve the problem?
Posted By: Lord Dexter Re: Error with Sticky Threads and 5.47 - 05/25/2001 1:00 PM
Maybe get rid of the "}" where it is not needed.
Posted By: LoneWolf Re: Error with Sticky Threads and 5.47 - 05/31/2001 5:59 PM
yeah as I said, its a typo.. here is the correct code; (am too lazy to search for the typo just replace this with what you have)

if ($checkit[1] eq "$threadnum") {
if ($itWasMoved eq 'yes') {
$checkit[6] = "Y$checkit[6]";
} else {
$checkit[6] =~ s/Y//isg;
}
if ($openclose eq "open") {
$checkit[6] =~ s/X//isg;
} elsif ($openclose eq "close") {
$checkit[6] = "X$checkit[6]";
} elsif ($openclose eq "top") {
$length = $in{'length'};
if (($TimeZoneOffset ne "") || ($TimeZoneOffset ne "0")) {
$adjustTime = time() + ($TimeZoneOffset * 3600);
} else { $adjustTime = time(); }
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($adjustTime);
$year = $year +1900;
if ($length eq "perm") { $year = $year + 10; }
$mon++;
$JulianDate = &jday($mon, $mday, $year);
$Time = ("$hour" . "$min");
$JulianTime = ($JulianDate + ($Time * 0.0001));
$JulianTime = sprintf("%7.4f", $JulianTime);
$JulianTime =~ tr/ /0/;
$checkit[0] = $JulianTime;
} else {
$year = substr($checkit[5],0,4);
$mon = substr($checkit[5],4,2);
$mday = substr($checkit[5],6,2);
$hour = substr($checkit[5],8,2);
$min = substr($checkit[5],10,2);
$JulianDate = &jday($mon, $mday, $year);
$Time = ("$hour" . "$min");
$JulianTime = ($JulianDate + ($Time * 0.0001));
$JulianTime = sprintf("%7.4f", $JulianTime);
$JulianTime =~ tr/ /0/;
$checkit[0] = $JulianTime;
}
Posted By: stubbsy Re: Error with Sticky Threads and 5.47 - 06/06/2001 1:31 PM
I get the following error with the code

syntax error at /home/sites/site10/web/forums/cgi-bin/ubb_library.pl line 1677, near "} else"


which appears to be about this section of replacement code

Next, find:
---------------------------------------------------
############################################
# print finalarray to file

&Lock("lock.file");
open (THREADS, ">$ForumsPath/$ExactPath/forum$thisnumber.threads") or die("Unabl
e to open thread summary file");
foreach $one(@finalarray) {
chomp($one);
print THREADS ("$onen");
}
close (THREADS);
&Unlock("lock.file");

chmod (0666, "$ForumsPath/$ExactPath/forum$thisnumber.threads");

} # end ForumSummary sr
---------------------------------------------------

REPLACE that with:
---------------------------------------------------
############################################
# print finalarray to file

if ($WriteSummary ne "no") {
&Lock("lock.file");
open (THREADS, ">$ForumsPath/$ExactPath/forum$thisnumber.threads") or die("Unabl
e to open thread summary file");
foreach $one(@finalarray) {
chomp($one);
print THREADS ("$onen");
}
close (THREADS);
&Unlock("lock.file");

chmod (0666, "$ForumsPath/$ExactPath/forum$thisnumber.threads");
} else {
return (@finalarray);
}

} # end ForumSummary sr
---------------------------------------------------


any help would be gratefully recieved (btw using 5.47d)

tia

stubbsy

[ June 06, 2001 06:31 AM: Message edited by: stubbsy ]
© UBB.Developers