User Posting Stats
1.1
This mod adds new posting stats to a user's profile. When the profile is viewed, you day for the user, the last post of the user, and the number of days the user has been registered. NOTE : Admin must set their date of registration from "The start of these forums ;-)" to an actual date and time eg "10/23/01 at 11:00:00"
This version includes bug fix for month 12.
MADD Hatter
Converted to SP1 by Ken Ault
http://www.GhostCDR.com
Sources\Profile.pl
$online =~ s~\?~$txt{'687'}.~;
### USER POSTING STATS ###
fopen(FILE, "$memberdir/$INFO{'username'}.mh");
@mhfile = ;
fclose(FILE);
$subjectlast = $mhfile[1];
$icon = $mhfile[2];
$threadnum = $mhfile[3];
$startnum = $mhfile[4];
$currentboard = $mhfile[5];
if($icon ne '') {
$iconimg = qq~
~;
} else {
$iconimg = "(Not Available)";
}
if($memsettings[14] ne '') {
($usermonth, $userday, $useryear) = split(/\//, $memsettings[14]);
}
if($memsettings[14] eq "Start of these Forums ;-)") {
$usermonth = "01";
$userday = "01";
$useryear = "101";
}
$|++;
use Time::Local;
my $day = 24 * 60 * 60;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = $year + 1900;
$usermonth = $usermonth - 1;
my $today = timelocal(0,0,12,$mday,$mon,$year);
my $days = timelocal(0,0,12,$userday,$usermonth,$useryear);
$dif = int ( ($days - $today)/$day ), "\n";
$dif = $dif * -1;
if($dif == '0') {
$dif = '1';
}
$avpost = $memsettings[6] / $dif;
$avpost = sprintf("%.2f", $avpost);
### END USER POSTING STATS ###
$memsettings[6] |
$memsettings[6] ($avpost posts per day) |
|
| $txt{'513'}: |
Last Post: |
$iconimg $subjectlast |
| $dr |
$dr ($dif days) |
Sources\Post.pl
$yySetLocation = qq~$cgi;action=display;num=$thread;start=$start~;
if (-e "$memberdir/$username.mh") {
fopen(FILE, "$memberdir/$username.mh");
@mhfile = ;
chomp $mhfile[0];
fclose(FILE);
if($mhfile[0] eq "0" || $mhfile[0] eq "1") {
$censoption = $mhfile[0];
} else {
$censoption = '';
}
}
fopen(FILE, ">$memberdir/$username.mh");
print FILE qq~$censoption\n$FORM{'subject'}\n$FORM{'icon'}\n$thread\n$mreplies\n$currentboard~;
fclose(FILE);
Sources\Profile.pl
unlink("$memberdir/$member{'username'}.imconfig");
unlink("$memberdir/$member{'username'}.mh");
unlink("$memberdir/$username.imconfig");
unlink("$memberdir/$username.mh");
Sources/Admin.pl
unlink("$memberdir/$currentmem.imconfig");
unlink("$memberdir/$currentmem.mh");