Ooops, i do have a serious problem on my 5.45, changed the forumdisplay, when opening the forumdisplay on my ubb there's an error message, 'illegale division by zero in line 976' (it's the line "$lastpage = "$NonCGIURL/$ExactPath/HTML/$threadinfo[1]-$i.html";"), my source looks like this:
sub TopicGutsHTML {
if ($PrivateMax eq "yes") {
$ThisURL = qq($CGIURL/forumdisplay.cgi?action=displayprivate&number=$number&topic=$threadinfo[1]);
} else {
$ThisURL = qq($NonCGIURL/$ExactPath/HTML/$threadinfo[1].html);
}
##Slurpee/Sephiroth(Dark Templar)'s Latest reply by username hack
$replies = $threadinfo[3];
$totalposts = $replies+ 1;
$lastpage = "";
$thesepages = $totalposts / $HTMLDisplayMax;
if ($remainder >= 0) { $thesepages++; }
if ($thesepages > 0) {
$lastpage = "$ThisURL";
for (my $i=2; $i< $thesepages; $i++){
if ($PrivateMax eq "yes") {
$lastpage = "$CGIURL/forumdisplay.cgi?action=displayprivate&number=$number&topic=$threadinfo[1]-$i";
} else {
$lastpage = "$NonCGIURL/$ExactPath/HTML/$threadinfo[1]-$i.html";
}
}
}
$lastName = $threadinfo[8];
$lastName =~ tr/+/ /;
if ($replies >= 1) {
$lastAuthName = qq(
Latest reply by:
$lastName );
} else {
$lastAuthName = "";
}
if (-e "$NonCGIPath/$ExactPath/ubbcount.file") {
open(CHECK, "$NonCGIPath/$ExactPath/ubbcount.file") || die ( &StandardHTML("Unable to open forum's counting file for reading
$!") );
@dta =
;
close(CHECK);
$final_hits = 0;
foreach $dta_line(@dta) {
chomp($dta_line);
($xurl, $xcount) = split(/|/, $dta_line);
if ($xurl eq "$ThisURL") {
$final_hits = $xcount;
$newn = $threadinfo[3];
$writtingp = sprintf("%4.2f", (($newn / $final_hits) * 100));
}
}
}
else {
$final_hits = 0;
$writtingp = "0.00";
}
if ($writtingp eq "") {
$writtingp = "0.00";
}
$newpath = $ExactPath;
@info = split(///, $newpath);
print <
------------------