Users on Forum
1
This mod adds a list of all the members currently viewing the forum you are.
The list is displayed right below the tree of your location.
DemonSlayer
Sources/MessageIndex.pl
# Print the header and board info.
$curboardurl = $curposlinks ? qq~$boardname~ : $boardname;
####################Active Users####################
#Edit of StarSabers "Active users in this forum" #
#Thanks to Hiryuu for testing #
####################################################
# Start Active users in this forum mod
# $membercount is the number of people on the current board
$membercount = 0;
$users = '';
fopen(FILE, "$vardir/log.txt");
@entries = ;
fclose(FILE);
foreach $curentry (@entries) {
chomp $curentry;
($name, $onvalue, $boardnow) = split(/\|/, $curentry);
if($name) {
if(!$yyUDLoaded{$name}) {
&LoadUser($name);
}
if ( exists $userprofile{$name} && $boardnow eq $INFO{'board'}) {
$users .= qq~$userprofile{$name}->[1], \n~;
++$membercount;
}
}
}
$users =~ s~, \n\Z~~;
if ($membercount == 0) {
$users = qq~No one~;
}
# Mod Finished Active users in this forum mod
###################/Active Users###################
#Edit of StarSabers "Active users in this forum" #
#Thanks to Hiryuu for testing #
###################################################
$mbname

$cat

$curboardurl $showmods
|
$mbname

$cat

$curboardurl $showmods
Users browsing Forum: $users |
Sources/Subs.pl
my $field = $username;
$openthreadnow="$currentboard";
print LOG "$field|$date\n";
print LOG "$field|$date|$openthreadnow\n";
Sources/BoardIndex.pl
$showmods
$showmods
• Active users in this forum: $membercount{$curboard}
unless( $lastposterguest{$curboard} || $lastposter{$curboard} eq $txt{'470'} ) {
$lastposterid = $lastposter;
&LoadUser($lastposterid);
if($userprofile{$lastposter}->[1]) { $lastposter = qq~$userprofile{$lastposter}->[1]~; }
}
$lastposter ||= $txt{'470'};
$lastposttime ||= $txt{'470'};
####################Active Users####################
#Edit of StarSabers "Active users in this forum" #
#Thanks to Hiryuu for testing #
####################################################
# Start Active users in this forum mod
$hidecount{$curboard} = 0;
$membercount{$curboard} = 0;
fopen(FILE, "$vardir/log.txt");
@entries = ;
fclose(FILE);
foreach $curentry (@entries) {
chomp $curentry;
($name, $logdate, $boardnow, $hide) = split(/\|/, $curentry);
if ($name) {
&LoadUser($name);
if( exists $userprofile{$name} ) {
if ( $boardnow eq $curboard && $hide eq 0) {
++$membercount{$curboard};
} elsif( $boardnow eq $curboard && $hide eq 1) {
++$hidecount{$curboard};
} else {
++$guests;
}
}
}
}
# Mod Finished Active users in this forum mod
###################/Active Users###################
#Edit of StarSabers "Active users in this forum" #
#Thanks to Hiryuu for testing #
###################################################