Users Latest Posts 1.1 only for GERMAN version! This mod adds the last 10 posts of a user to his profile. version 1.1: - date fixed - title fixed [CV}XXL http://xxl.cstrike.de YaBB.pl if ($action eq "detailedversion") { require "$sourcedir/Admin.pl"; &ver_detail; } if ($action eq "usersrecentposts") { require "$sourcedir/Subs.pl"; &usersrecentposts; } Sources/Profile.pl
$users_latest_posts{'1'}:
$users_latest_posts{'2'} $users_latest_posts{'3'}
Sources/Subs.pl 1; sub usersrecentposts { require "$sourcedir/Display.pl"; &readform; $display = $FORM{'viewscount'}; open(FILE, "$memberdir/$INFO{'username'}.dat") || &fatal_error("$txt{'23'} $INFO{'username'}.txt"); &lock(FILE); @memset = ; &unlock(FILE); close(FILE); open(FILE, "$vardir/cat.txt"); &lock(FILE); @categories = ; &unlock(FILE); close(FILE); %data= (); foreach $curcat (@categories) { $curcat =~ s/[\n\r]//g; open(CAT, "$boardsdir/$curcat.cat"); &lock(CAT); @catinfo = ; &unlock(CAT); close(CAT); $catinfo[1] =~ s/[\n\r]//g; foreach(split(/\,/,$catinfo[1])) { $membergroups{$_} = $_; } if($catinfo[1] ne "") { if($settings[7] ne "Administrator" && !exists $membergroups{$settings[7]}) { next; } } $curcatname="$catinfo[0]"; foreach $curboard (@catinfo) { if($curboard ne "$catinfo[0]" && $curboard ne "$catinfo[1]") { $curboard =~ s/[\n\r]//g; open(BOARDDATA, "$boardsdir/$curboard.txt"); &lock(BOARDDATA); @messages = ; &unlock(BOARDDATA); close(BOARDDATA); open(BOARDDATA, "$boardsdir/$curboard.dat"); &lock(BOARDDATA); @boardinfo = ; &unlock(BOARDDATA); close(BOARDDATA); for ($a = 0; $a < @messages; $a++) { ($title[0], $title[1], $title[2], $title[3], $title[4], $title[5], $title[6], $title[7], $title[8]) = split(/\|/, $messages[$a]); #### output #### open (TEXT, "$datadir/$title[0].txt") || &fatal_error("$txt{'23'} $title[0].txt"); @text = ; close(TEXT); for ($c = 0; $c < @text; $c++) { ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $mmessage, $mns) = split(/\|/,$text[$c]); $message = $mmessage; if($enable_ubbc) { &DoUBBC; } $board = "$curboard"; $post=<<"EOT";  $catinfo[0] / $boardinfo[0] / $title[1]  $txt{'30'}: $mdate  $message  $txt{'146'} | $txt{'145'} | $txt{'125'}
EOT ($date1, $time1) = split(/ at /, $mdate); ($month1, $day1, $year1) = split(/\//, $date1); ($hour1, $min1, $sec1) = split (/:/, $time1); $totaltime1 = (($year1+2000)*365+$month1*30+$day1)*24*60*60+$hour1*60*60+$min1*60; if ($INFO{'username'} eq $musername) { $data{$totaltime1}= $post; } } } } } } $title = "Users Latest Posts"; &header; print "\n\n"; print "

$txt{'92'} $memset[1]

\n"; @num = sort {$b <=> $a } keys %data; $j=0; if ($display ne "0") { while ($j<$display && $data{$num[$j]} ne ""){ $j2 = $j + 1; print <<"EOT"; EOT print "$data{$num[$j]}"; $j++; } } else { while ($data{$num[$j]} ne ""){ $j2 = $j + 1; print <<"EOT";
 $j2 
EOT print "$data{$num[$j]}"; $j++; } } print "

$txt{'92'} $memset[1]

\n"; print "\n\n\n"; &footer; exit; } german.lng 1; $users_latest_posts{'1'} = "Zusätzliche Informationen"; $users_latest_posts{'2'} = "Zeige die letzten"; $users_latest_posts{'3'} = "Posts dieser Person"; $users_latest_posts{'4'} = "LOS!";

 $j2