Here´s the freeware-hack for displaying the last user who has posted a message.
In postings.cgi find the following code:
#update last time file
&Lock("lock.file");
open (LASTTIME, ">$ForumsPath/Forum$number/lasttime.file") or die(&StandardHTML("Unable to write a Forum$number LastTime.file $!"));
print LASTTIME ("$HyphenDaten");
print LASTTIME ("$Timen");
close (LASTTIME);
&Unlock("lock.file");
chmod (0666, "$ForumsPath/Forum$number/lasttime.file");
Behind it insert:
#update last user file
&Lock("lock.file");
open (LASTUSER, ">$ForumsPath/Forum$number/lastuser.file") or die(&StandardHTML("Unable to write a Forum$number LastUser.file $!"));
print LASTUSER ("$UserNamen");
close (LASTUSER);
&Unlock("lock.file");
chmod (0666, "$ForumsPath/Forum$number/lastuser.file");
Now find:
&Lock("lock.file");
open (FORUM, ">$ForumsPath/Forum$number/$newtopicfile");
print FORUM ("$StatsLinen");
print FORUM ("$FatherLinen");
close (FORUM);
&Unlock("lock.file");
chmod (0666, "$ForumsPath/Forum$number/$newtopicfile");
Also insert the above hack behind it:
#update last user file
&Lock("lock.file");
open (LASTUSER, ">$ForumsPath/Forum$number/lastuser.file") or die(&StandardHTML("Unable to write a Forum$number LastUser.file $!"));
print LASTUSER ("$UserNamen");
close (LASTUSER);
&Unlock("lock.file");
chmod (0666, "$ForumsPath/Forum$number/lastuser.file");
Now find the following code in Ultimate.cgi:
## Get Forum Data from lastnumber.file(s)
open (FORUMDATA, "$ForumsPath/Forum$x/lastnumber.file");
my @data =
;
close (FORUMDATA);
$TotalTopics = $data[1];
chomp($TotalTopics);
$TotalPosts = $data[2];
chomp($TotalPosts);
IN FRONT OF IT insert:
## Get Forum Data from lastuser.file(s)
if (-e "$ForumsPath/Forum$x/lastuser.file") {
open (FORUMDATA, "$ForumsPath/Forum$x/lastuser.file");
my @data = ;
close (FORUMDATA);
$LastPoster = "$data[0]";
} else {
if (-e "$ForumsPath/Forum$x/lasttime.file") {
$LastPoster = "";
} else {
$LastPoster = "No postings yet.";
}
}
Now go to sub ForumsGutsHTML and search for $TheDate. Insert "$LastPoster
" in front of it.
This hack works fine with my freewareversion 2000. But should also work with the full version. Beside it should be quicker than the above hacks.
------------------
Grüße aus Deutschland / Greatings from Germany
Leisure Larry
Homepage: Catan & Stonehedge - Multiplayerz vs. HTML