| |
Forum Info |
Replies |
Topics |
Last Post |
~;
#------- END OF HTML
if ($announcements eq 'yes') {
#------- HTML
$output .= qq~
|
» Announcements
|
~;
#------- END OF HTML
my $filetoopen = "$ikondir" . "data/news.cgi";
if (-e $filetoopen) {
openFILE(-FH=>'FILE',-FN=>"$filetoopen",-MD=>'r');
my @announcementdata = ;
close(FILE);
my $totalannouncements = @announcementdata;
($title, $dateposted, $trash) = split(/\|/, $announcementdata[0]);
}
else { $dateposted = time; $title = 'No current announcements'; }
my $dateposted = $dateposted + ($timedifferencevalue*3600) + ($timezone*3600);
$dateposted = &longdate("$dateposted");
#------- HTML
$output .= qq~
|
$title
|
[ Read ]
|
$dateposted
|
~;
#------- END OF HTML
}
### Open up the allforums file.
$filetoopen = "$ikondir" . "data/allforums.cgi";
$filetoopen = &stripMETA($filetoopen);
open(FILE, "$filetoopen") or die "Have you created any forums yet?";
flock FILE,1;
@forums = ;
close(FILE);
foreach $forum (@forums) { #start foreach @forums
chomp $forum;
($forumid, $category, $categoryplace, $forumname, $forumdescription, $forummoderator ,$htmlstate ,$idmbcodestate ,$privateforum, $startnewthreads ,$lastposter ,$lastposttime, $threads, $posts, $forumgraphic) = split(/\|/,$forum);
$rearrange = ("$categoryplace|$category|$forumname|$forumdescription|$forummoderator|$htmlstate|$idmbcodestate|$privateforum|$startnewthreads|$lastposter|$lastposttime|$threads|$posts|$forumgraphic|$forumid");
push (@rearrangedforums, $rearrange);
} # end foreach (@forums)
@finalsortedforums = sort numerically(@rearrangedforums);
foreach $sortedforums (@finalsortedforums) { #start foreach @finalsortedforums
($categoryplace, $category, $forumname, $forumdescription, $forummoderator, $htmlstate, $idmbcodestate, $privateforum, $startnewthreads, $lastposter, $lastposttime, $threads, $posts, $forumgraphic, $forumid) = split(/\|/,$sortedforums);
if ($forummoderator) {
$forummoderator =~ s/\, /\,/g;
my @mods = split(/\,/,$forummoderator);
my $tm = @mods; my $mc = 1;
foreach (@mods) {
my $cmodn = $_; $cmodn =~ y/ /_/;
if ($mc != $tm) {
$modout .= qq~$_, ~;
}
else { $modout .= qq~$_~; }
$mc++;
}
$modout = qq!(Moderated by: $modout)!;
}
if ($categoryplace ne $lastcategoryplace) {
$output .= qq~| » $category | ~;
}
my $fm = $forumname; $forumname = qq~$forumname~;
$forumlastvisit = $lastvisitinfo{$forumid};
$folderpicture = qq( );
if (($lastposttime > $forumlastvisit) and ($inmembername ne 'Guest')) {
$folderpicture = qq~ ~;
$posts = qq~$posts~;
}
else {
$folderpicture = qq~ ~;
$posts = qq~$posts~;
}
if ($inmembername eq 'Guest') { $folderpicture = qq( ); $loginmessage = "You must be logged in to view the post markers"; }
$forumlastvisit = $forumlastvisit + ($timedifferencevalue*3600) + ($timezone*3600);
$lastdate = &longdate("$forumlastvisit");
$lasttime = &shorttime("$forumlastvisit");
if ($lastposttime) {
$lastposttime = $lastposttime + ($timedifferencevalue*3600) + ($timezone*3600);
$longdate = &longdate("$lastposttime");
$shorttime = &shorttime("$lastposttime");
$forumlastpost = qq~Date: $longdate Time: $shorttime~;
}
else { $forumlastpost = qq~N/A~; }
$lastposterfilename = $lastposter;
$lastposterfilename =~ y/ /_/;
$lastposter =~ y/_/ /;
#------- HTML
$output .= qq~
|
$folderpicture
|
$forumname
$forumdescription
$modout
|
$posts
|
$threads
|
$forumlastpost by: $lastposter
|
~;
#------- END OF HTML
$lastcategoryplace = $categoryplace;
undef $forumlastvisit; undef $forummoderator; undef $modout;
}
&whosonline("$inmembername|Main board page|both");
my $total_users = $guests + $members;
#------- HTML
$output .= qq~
|
$total_users user(s) active in the past 15 minutes
|
|
Guests: $guests, Total members: $members
$memberoutput
|
|