############################################################################### # BoardIndex.pl # ############################################################################### # YaBB: Yet another Bulletin Board # # Open-Source Community Software for Webmasters # # Version: YaBB 1 Gold - SP 1.3 # # Released: December 2001; Updated April 6, 2003 # # Distributed by: http://www.yabbforum.com # # =========================================================================== # # Copyright (c) 2000-2003 YaBB (www.yabbforum.com) - All Rights Reserved. # # Software by: The YaBB Development Team # # with assistance from the YaBB community. # # Sponsored by: Xnull Internet Media, Inc. - http://www.ximinc.com # ############################################################################### $boardindexplver = "1 Gold - SP 1.3"; sub BoardIndex { # Load censor list. fopen(FILE,"$vardir/censor.txt"); while( chomp( $buffer = ) ) { ($tmpa,$tmpb) = split(/=/,$buffer); push(@censored,[$tmpa,$tmpb]); } fclose(FILE); #RECENT USERS LIST MOD START if ($username ne 'Guest' && $action ne 'login2') { require "$sourcedir/LogInOut.pl"; &RecentUsersList; } #RECENT USERS LIST MOD END # Open the file with all categories fopen(FILE, "$vardir/cat.txt"); @categories = ; fclose(FILE); $yyCatsLoaded = 1; my($memcount, $latestmember) = &MembershipGet; $totalm = 0; $totalt = 0; foreach $curcat (@categories) { chomp $curcat; fopen(FILE, "$boardsdir/$curcat.cat"); $catname{$curcat} = ; chomp $catname{$curcat}; $cataccess{$curcat} = ; chomp $cataccess{$curcat}; @{$catboards{$curcat}} = ; fclose(FILE); @membergroups = split( /,/, $cataccess{$curcat} ); $openmemgr{$curcat} = 0; foreach $tmpa (@membergroups) { if($tmpa eq $settings[7]) { $openmemgr{$curcat} = 1; last; } } if(!$cataccess{$curcat} || $settings[7] eq 'Administrator') { $openmemgr{$curcat} = 1; } unless($openmemgr{$curcat}) { next; } foreach $curboard (@{$catboards{$curcat}}) { chomp $curboard; ( $threadcount, $messagecount, $lastposttime, $lastposter, $lastthreadid{$curboard} ) = &BoardCountGet($curboard); $lastposttime{$curboard} = $lastposttime eq 'N/A' || ! $lastposttime ? $txt{'470'} : &timeformat($lastposttime); $lastpostrealtime{$curboard} = $lastposttime eq 'N/A' || ! $lastposttime ? '' : $lastposttime; if( $lastposter =~ m~\AGuest-(.*)~ ) { $lastposter = $1; $lastposterguest{$curboard} = 1; } $lastposter{$curboard} = $lastposter eq 'N/A' || ! $lastposter ? $txt{'470'} : $lastposter; $messagecount{$curboard} = $messagecount || 0; $threadcount{$curboard} = $threadcount || 0; $totalm += $messagecount; $totalt += $threadcount; } } $curforumurl = $curposlinks ? qq~$mbname~ : $mbname; if( $enable_favorites && $enable_favdrop && $username ne 'Guest' ) { require "$sourcedir/Favor.pl"; &favordrop; $yymain .= qq~
$favselect

~; } #RECENT USERS LIST MOD START if ($rul_show_avatars && ($rul_avatar_width || $rul_avatar_height)) { $yymain .= qq~ ~; } #RECENT USERS LIST MOD END if($username eq 'Guest') { require "$sourcedir/LogInOut.pl"; $sharedLogin_title="$txt{'34'} ($txt{'315'})"; &sharedLogin; } $yymain .= qq~

$curforumurl ~; if($shownewsfader == 1) { if(!$fadedelay) { $fadedelay = 5000; } $yymain .= qq~
$txt{'102'}
~; } ########showcase poll start # Look for a showcase.poll file. if (-e "$datadir/showcase.poll") { my ($board, $viewnum); fopen (FILE, "$datadir/showcase.poll"); @showdata = ; fclose (FILE); $showcasepoll = $showdata[0]; $showcasepoll =~ s~\n~~g; ($scboard, $viewnum) = split(/\|/, $showcasepoll); # Look for a valid poll file. if (-e "$datadir/$viewnum.poll") { $pollthread = 1; unless( &BoardAccessGet($scboard) ) { $pollthread = 0; } } if ($pollthread) { $yymain .= qq~~; require "$sourcedir/Poll.pl"; &display_poll($viewnum, 1, $scboard); } } #########showcase poll end $yymain .= qq~
~; #Check to see if the subcat.txt doesn't exist, if it doesn't we still need a forum header or it looks funny if(!(-e "$vardir/subcat.txt")) { $yymain .= qq~ ~; } #This bit of code goes through and checks if we have visible categories. If there are no visible # categories, we need to still insert a
Forum Name $txt{'330'} $txt{'21'} $txt{'22'}
string or else the info table will expand to full screen. $catisvisible="false"; foreach $curcat (@categories) { unless( $openmemgr{$curcat} ) { next; } $catisvisible="true"; } if($catisvisible eq "false") { $yymain .= qq~
~; } #Go through the categories and creat the tables if they are needed $foundasubcat="false"; foreach $curcat (@categories) { unless( $openmemgr{$curcat} ) { next; } #### if ($catpic{$curcat} =~ /\//i) {$catpic{$curcat} = qq~ ~;} elsif ($catpic{$curcat}) {$catpic{$curcat} = qq~ ~;} #### fopen(FILE, "$vardir/subcat.txt"); @subcategories = ; fclose(FILE); $newsubcatlist=""; #Go through the subcats and check to see if the curcat is found in the subcats file (It is a subcategory) foreach $cursubcat (@subcategories) { chomp($cursubcat); ($cursubcatid,$cursubcatname) = split(/\|/,$cursubcat); #Check if we found a match if ($curcat eq $cursubcatid) { $foundasubcat="true"; #This little code breaks the table away from the previous category if ($curcat ne @categories[0]) { $yymain .= qq~

~; } $yymain .= qq~ ~; } } #This code adds a table header for the very first category if the very first category is not found in subcat.txt if ((-e "$vardir/subcat.txt") && $foundasubcat eq "false") { $foundasubcat="true"; $yymain .= qq~
$cursubcatname $txt{'330'} $txt{'21'} $txt{'22'}
~; } $yymain .= qq~~; foreach $curboard (@{$catboards{$curcat}}) { chomp $curboard; my $access = &AccessCheck($curboard, ''); if ($settings[7] ne "Administrator" && $access ne "granted" && $showprivboards{$curboard} ne "1") {next;} fopen(FILE, "$boardsdir/$curboard.dat"); $curboardname = ; chomp $curboardname; $curboarddescr = ; chomp $curboarddescr; $curboardmods = ; chomp $curboardmods; fclose(FILE); %moderators = (); foreach $curuser (split(/\|/, $curboardmods)) { &LoadUser($curuser); $moderators{$curuser} = $userprofile{$curuser}->[1]; } $showmods = ''; if(scalar keys %moderators == 1) { $showmods = qq~$txt{'298'}: ~; } elsif(scalar keys %moderators != 0) { $showmods = qq~$txt{'299'}: ~; } while($tmpa = each(%moderators)) { &FormatUserName($tmpa); $showmods .= qq~$moderators{$tmpa}, ~; } $showmods =~ s/, \Z//; if($showmods eq "") { $showmods = qq~$txt{'298'}: $txt{'470'}~; } $dlp = &getlog($curboard); if( $max_log_days_old && $lastposttime{$curboard} ne $txt{'470'} && $username ne 'Guest' && $dlp < stringtotime( $lastpostrealtime{$curboard} ) ) { $new = qq~$txt{'333'}~; } else { $new = qq~$txt{'334'}~; } $lastposter = $lastposter{$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'}; #### $boardpic = ""; if (-e "$boardsdir/$curboard.mbo" ) { require "$boardsdir/$curboard.mbo"; } if ($boardpic{$curboard} =~ /\//i) {$boardpic{$curboard} = qq~ ~;} elsif ($boardpic{$curboard}) {$boardpic{$curboard} = qq~ ~;} my $cookiename = "$cookiepassword$curboard"; my $crypass = crypt($boardpw{$curboard},$pwseed); my $boardpwpic = ""; if ($settings[7] ne "Administrator" && $boardpw{$curboard} && $yyCookies{$cookiename} ne $crypass) {$boardpwpic = qq~~;} elsif ($boardpw{$curboard}) {$boardpwpic = qq~~;} #### ## LAST SUBJECT MOD ## # Use the following line to decide if you want the Latest Subject in the Board Index to display the details # (message icon, subject and link) of the FIRST post or LAST post of the most recently replied to thread $last_post = 1; # 0 = FIRST post; 1 = LAST post $subjecthtml = ""; if ($lastthreadid{$curboard}) { fopen(FILE,"$datadir/$lastthreadid{$curboard}.txt"); @tmp_messages = ; fclose(FILE); if ($last_post) {$subjectmain = $tmp_messages[$#tmp_messages];} else {$subjectmain = $tmp_messages[0];} ($subjectmain, $dummy, $dummy, $dummy, $dummy, $subicon, $dummy) = split(/\|/, $subjectmain); # Censor the subject of the thread. $subjectmain = &Censor($subjectmain); if (length($subjectmain) > 25) { $subjectmain = substr($subjectmain, 0, 25) . qq~ ...~; } if ($subicon eq "smiley" || $subicon eq "angry" || $subicon eq "cheesy" || $subicon eq "laugh" || $subicon eq "sad" || $subicon eq "wink" ) {$subicon = qq~~;} else { $subicon = qq~~;} # Detect if this thread is a poll thread if (-e "$datadir/$lastthreadid{$curboard}.poll") { fopen (FILE, "$datadir/$lastthreadid{$curboard}.poll"); $poll_question = ; fclose (FILE); chomp $poll_question; ($dummy, $poll_locked, $dummy) = split(/\|/, $poll_question, 3); $subicon = qq~$img{'pollicon'}~; if ($poll_locked eq "1" || $poll_locked eq "Locked") { $subicon = qq~$img{'polliconclosed'}~; } } if ($last_post) {$tmp_start = qq~;start=$#tmp_messages\#$#tmp_messages~;} else {$tmp_start = "";} $subjecthtml = qq~$subicon $subjectmain
~; if ($settings[7] ne "Administrator" && $boardpw{$curboard} && $yyCookies{$cookiename} ne $crypass) {$subjecthtml = qq~ $mbco{'14'}
~;} } ## END LAST SUBJECT MOD ## $yymain .= qq~
~; } } my $checkadded = 0; $guests = 0; $users = ''; $numusers = 0; fopen(FILE, "$vardir/log.txt"); @entries = ; fclose(FILE); foreach $curentry (@entries) { chomp $curentry; ($name, $value) = split(/\|/, $curentry); if($name) { if(!$yyUDLoaded{$musername}) { &LoadUser($name); } if(exists $userprofile{$name}) { $numusers++; $users .= qq~ $userprofile{$name}->[1], \n~; } else { $guests++; } } } $users =~ s~, \n\Z~~; if($username ne 'Guest') { $ims = @immessages; ### LIMITED IM MOD ### if($userimcfg[5] eq "on") { $yymain .= qq~~; } else { $yymain .= qq~~; } if ($minnum > $numibox && $numibox ne "" && $enable_imlimit == 1) { $yymain .= qq~~; &Del_Max_IM; } if ($moutnum > $numobox && $numobox ne "" && $enable_imlimit == 1) { $yymain .= qq~~; &Del_Max_IMOUT; } if ($storenum > $numstore && $numstore ne "" && $enable_imlimit == 1) { $yymain .= qq~~; &Del_Max_STORE; } $ims = qq~
$txt{'796'} $ims $imtxt{'24'}: $imnewcount~; ### END LIMITED IM ### $yymain .= qq~
~; } #set the correct rowspan for the RECENT USERS LIST main cell $rul_rowspan = ($username eq 'Guest') ? $rul_rowspan : $rul_rowspan - 2; $yymain .= qq~
Forum Name $txt{'330'} $txt{'21'} $txt{'22'}
$catpic{$curcat}$catname{$curcat}
$new $boardpic{$curboard}$curboardname $boardpwpic
$curboarddescr
$showmods
$threadcount{$curboard} $messagecount{$curboard} $subjecthtml$lastposttime{$curboard}
$txt{'525'} $lastposter
$txt{'333'} $txt{'333'}   $txt{'334'} $txt{'334'}   ~; if($showmarkread) { $yymain .= qq~$img{'markallread'}~; } $yymain .= qq~



~; $yymain .= qq~ ~; if($totalt > 0) { require "$sourcedir/TopStats.pl"; &TopLink; } $yymain .= qq~ ~; if ($forum_staff) { # Load MemberGroups if(!$MemStatAdmin) { fopen(FILE, "$vardir/membergroups.txt") || &fatal_error("100 $txt{'106'}: $txt{'23'} membergroups.txt"); @membergroups = ; fclose(FILE); chomp $membergroups[0]; $tmp_admin_txt = $membergroups[0] || "Administrator"; chomp $membergroups[7]; $tmp_gmod_txt = $membergroups[7] || "Global Moderator"; } else { $tmp_admin_txt = $MemStatAdmin || "Administrator"; $tmp_gmod_txt = $MemStatGMod || "Global Moderator"; } fopen(FILE, "$vardir/mem_groups.txt"); @mem_groups = ; fclose(FILE); @mem_groups = sort{uc($a) cmp uc($b)} (@mem_groups); foreach $curentry (@mem_groups) { chomp $curentry; ($tmp_username, $tmp_group, $tmp_name) = split(/\|/, $curentry); if ($group_list{$tmp_group}) { $group_list{$tmp_group} .= qq~, ~;} $group_list{$tmp_group} .= qq~$tmp_name~; } @staff = split (/,/, $forum_staff); $list = ""; foreach $curentry (@staff) { $curentry =~ s~^\s*(\S.*?\S|\S)\s*$~$1~; if($curentry eq "Administrator") {$tmp_group_txt = $tmp_admin_txt;} elsif($curentry eq "Global Moderator") {$tmp_group_txt = $tmp_gmod_txt;} else {$tmp_group_txt = $curentry;} if ($group_list{$curentry}) { $list .= qq~ ~; } } if ($list) {$yymain .= qq~ ~; } } $yymain .= qq~ ~; $yymain .=qq~ ~; ########### Newcalendar mod start ####################### chomp $newcalgroup; @newcalgrouplist = split(",",$newcalgroup); $newcalgroupflag = 0; foreach $newcalgroupitem (@newcalgrouplist) { if ($settings[7] eq $newcalgroupitem) { $newcalgroupflag = 1; } } if ($newcalopen == 1 || $settings[7] eq 'Administrator' || $newcalgroupflag ==1 ) { if ($newcalmoon2 == 1) { require "$sourcedir/MoonPhase.pl"; #This is the moon phase calculator ( $MoonPhase, $MoonIllum, $MoonAge, $MoonDist, $MoonAng, $SunDist, $SunAng ) = phase(); my ($newphaselow) = 0.016666667; my ($newphasehigh) = 0.983333333; my ($phaseincrement) = 0.033333333; if ( ($MoonPhase < $newphaselow) || ($MoonPhase > $newphasehigh) ){ $moonpict = qq~~; } else { $gifnumber = 1; for ($phasescan = $newphaselow; $phasescan < $newphasehigh; $phasescan += $phaseincrement) { if ( ($MoonPhase > $phasescan) && ( $MoonPhase <= ($phasescan + $phaseincrement)) ){ if ($gifnumber < 10) { $moonpict = qq~~; } else { $moonpict = qq~~; } } $gifnumber++; } } } else { $moonpict = qq~~; } $yymain .=qq~ ~; } ########### Newcalendar mod end ####################### $yymain .= qq~
$txt{'685'} $rul_users_display $rul_txt{'1'}
$txt{'200'} ~; &RecentUsersListShow; $yymain .= qq~
$txt{'490'} $totalt   -   $txt{'489'} $totalm ~; if($Show_RecentBar) { require "$sourcedir/Recent.pl"; &LastPost; } &topthreads; $yymain .= qq~ $txt{'488'} $memcount ~; if ($showlatestmember) { &LoadUser($latestmember); $yymain .= qq~
$txt{'201'}: $userprofile{$latestmember}->[1]~; } $yymain .= qq~ $ims
$tmp_group_txt: $group_list{$curentry}
$txt{'509c'}
$list
$txt{'158'}
$guests $txt{'141'}, $numusers $txt{'142'}
$users
$tttxt{'01'}
$tttxt{'04'} $linktoday
$tttxt{'03'} $linkmonth
$tttxt{'02'} $linkever
$ircgoose{'11'}
$ircgoose{'13'}
$ircgoose{'12'}
~; if ($popupmode == 1){ $yymain .=qq~$img{'chatirc'} Now~; } else { $yymain .=qq~$img{'chatirc'} Now~; } $yymain .=qq~
$ecaltxt{'55'}
$moonpict
~; require "$sourcedir/NewcalIndex.pl"; if ($newcalindexmini == 1) { $yymain .=qq~
~; &IndexCal; $yymain .=qq~ ~; require "$sourcedir/NewcalPost.pl"; &MiniCalYY; $yymain .=qq~$yyminical~; $yymain .=qq~
~; } else { &IndexCal; } $yymain .=qq~
~; if($imnewcount > 0 && $enable_mailpopup == 1) { if($imnewcount > 1) { $en = "s"; $en2 = "$imtxt{'47'}"; } else { $en = ""; $en2 = "$imtxt{'48'}"; } open(FILE, "$memberdir/$username.imconfig"); @imuserdata = ; close(FILE); chomp($imuserdata[3]); chomp($imuserdata[5]); if($imuserdata[3] eq "on") { if($imuserdata[5] eq "on") { $yymain .= qq~ ~; } else { $yymain .= qq~ ~; } $yymain .= qq~ ~; } } $yytitle = "$txt{'18'}"; &template; exit; } #RECENT USERS LIST #v1.4 #OUTPUTS A TABLE WITH $rul_users_display ROWS - ONE FOR EACH USER IN THE LIST sub RecentUsersListShow { fopen(FILE, "$vardir/lastuseronline.txt"); @lastusers = ; fclose(FILE); chomp @lastusers; $counter = 1; $yymain .= qq~~; foreach $lastuser_line (@lastusers) { ($last_username, $last_userwhen) = split(/\|/, $lastuser_line); #is this user online now? $online_now = ($users =~ /username=$last_username"/) ? "
$rul_txt{'2'}" : ''; #it should never happen, but a Guest entry might have been stored in the file. this avoids showing it if (fopen(MFILE, "$memberdir/$last_username.dat")) { @memberinfo = ; fclose(MFILE); chomp @memberinfo; $last_userwhen = ($rul_show_time) ? '
' . &timeformat($last_userwhen) : ''; #do we want to show an avatar? if ($rul_show_avatars) { #correct url allowing for custom avatars if ($memberinfo[13] =~ m~\Ahttp://~) { $avatar = $memberinfo[13]; } else { $avatar = $facesurl . '/' . $memberinfo[13]; } #is resizing enabled or shall we just show a plain image tag? #if we're using avatar resizing if ($rul_avatar_width || $rul_avatar_height) { #decide what the avatar link should be if ($rul_avatar_link == 2) { $avatars_cell = qq~
~; } elsif ($rul_avatar_link == 1) { $avatars_cell = qq~~; } else { $avatars_cell = qq~~; } } #else we're not using resizing so just use the normal image tag else { #decide what the avatar link should be if ($rul_avatar_link == 2) { $avatars_cell = qq~~; } elsif ($rul_avatar_link == 1) { $avatars_cell = qq~~; } else { $avatars_cell = qq~~; } } } #else we're not showing avatars, so just show the text counter else { $avatars_cell = qq~~; } #output this row $yymain .= qq~$avatars_cell~; } $counter++; } $yymain .= qq~
$rul_txt{'12'} $memberinfo[1]$rul_txt{'13'} $memberinfo[1]$memberinfo[1]$rul_txt{'12'} $memberinfo[1]$rul_txt{'13'} $memberinfo[1]$memberinfo[1]$counter.
$memberinfo[1]$last_userwhen$online_now
~; } sub MarkAllRead { fopen(FILE, "$vardir/cat.txt"); my @categories = ; fclose(FILE); my( $curcat, $curcatname, $curcataccess, @catboards, @membergroups, $openmemgr, $curboard ); foreach $curcat (@categories) { chomp $curcat; fopen(FILE, "$boardsdir/$curcat.cat"); $curcatname = ; $curcataccess = ; chomp $curcatname; chomp $curcataccess; @catboards = ; fclose(FILE); @membergroups = split( /,/, $curcataccess ); $openmemgr = 0; foreach (@membergroups) { if( $_ eq $settings[7]) { $openmemgr = 1; last; } } if(!$curcataccess || $settings[7] eq 'Administrator') { $openmemgr = 1; } unless( $openmemgr ) { next; } foreach $curboard (@catboards) { chomp $curboard; &modlog("$curboard--mark"); &modlog($curboard); } } &dumplog; &BoardIndex; } sub topthreads { ### topthread ever opendir (DIR,"$datadir"); @dirdata2 = readdir(DIR); closedir (DIR); @datei = grep(/\.txt/,@dirdata2); foreach $test (@datei){ open(FILE,"$datadir/$test") or die "Fehler $!"; @test = ; close(FILE); $laenge = @test; $doit{$test} = $laenge; } #### top thread month and day foreach $spezi (@datei){ open(FILE,"$datadir/$spezi") or die "Fehler $!"; @test3 = ; close(FILE); foreach $supi2 (@test3){ ($x, $y, $z, $time, $u, $v, $w, $r, $s, $t) = split(/\|/,$supi2); ($date4,$time4) = split(/ /,$time); ($monthit, $dayit, $yearit) = split(/\//,$date4); $spezi =~ s/\.txt//gi; push @monthsgo, "$monthit|$yearit"; push @time2, $date4; push @threadit2, $spezi; push @threadit4, $spezi; } } for (0..$#time2){if (exists $makeit{$time2[$_]}){push @{$makeit{$time2[$_]}},$threadit2[$_];}else{@{$makeit{$time2[$_]}}=$threadit2[$_]}} for (0..$#monthsgo){if (exists $makedown{$monthsgo[$_]}){push @{$makedown{$monthsgo[$_]}},$threadit4[$_];}else{@{$makedown{$monthsgo[$_]}}=$threadit4[$_]}} &get_date; ($date3, $f) = split(/ /, $date); ($monthgo, $daygo, $yeargo) = split(/\//, $date3); chomp @{$makeit{"$date3"}}; chomp @{$makedown{"$monthgo|$yeargo"}}; @daten = sort {$a <=> $b} @{$makeit{"$date3"}}; @monthdat = sort {$a <=> $b} @{$makedown{"$monthgo|$yeargo"}}; foreach (@daten){ $anzahl{$_}++; } foreach (sort {$anzahl{$b} <=> $anzahl{$a}} keys %anzahl) { push @sort_data, $_ } foreach (@monthdat){ $anzahl2{$_}++; } foreach (sort {$anzahl2{$b} <=> $anzahl2{$a}} keys %anzahl2) { push @monthsdat, $_ } ##### #boardprüfung - threadzuordnung opendir (DIR,"$boardsdir"); @dirdata = readdir(DIR); closedir (DIR); @datei2 = grep(/\.txt/,@dirdata); foreach $mega (@datei2){ open(FILE,"$boardsdir/$mega") or die "Fehler $!"; @mega = ; close(FILE); foreach $supi (@mega){ ($num, $a, $b, $c, $d, $e, $f, $g, $h) = split(/\|/,$supi); $mega =~ s/\.txt//gi; push @board2, $mega; push @num2, $num; } } $hasit{$num2[$_]}=$board2[$_] for (0..$#num2); ###### wer mit wem prüfung ;) ### fopen(FILE, "$vardir/cat.txt"); @categories = ; fclose(FILE); chomp @categories; foreach $catit (@categories){ open (FILE,"$boardsdir/$catit.cat") or die "haha!"; @all = ; close (FILE); $hehe2{$catit} = $all[1]; @all2 = @all; @weg2 = splice(@all2,0,2); for (0..$#all2) {$goit{$all2[$_]} = $catit } } foreach (sort {$doit{$b} <=> $doit{$a}} keys %doit){ $tra = $_; $tra =~ s/\.txt//gi; $boarddayt = $hasit{$tra}; $boarddayu = $goit{$boarddayt}; chomp $hehe2{$boarddayu}; if ($hehe2{$boarddayu} eq "") {$most = $_; last;} if ($settings[7] eq $hehe2{$boarddayu}){$most = $_; last; } if ($settings[7] eq "Administrator"){$most = $_; last;} } foreach $todayt (@sort_data){ $board3t = $hasit{$todayt}; $board3u = $goit{$board3t}; chomp $hehe2{$board3u}; if ($hehe2{$board3u} eq "") {$todaysactive = $todayt; last;} if ($settings[7] eq $hehe2{$board3u}){$todaysactive = $todayt; last;} if ($settings[7] eq "Administrator"){$todaysactive = $todayt; last;} } foreach $monthtop (@monthsdat){ $board3m = $hasit{$monthtop}; $board3n = $goit{$board3m}; chomp $hehe2{$board3n}; if ($hehe2{$board3n} eq "") {$monthsactive = $monthtop; last;} if ($settings[7] eq $hehe2{$board3n}){$monthsactive = $monthtop; last;} if ($settings[7] eq "Administrator"){$monthsactive = $monthtop; last;} } $linkit = $most; $linkit =~ s/.txt//gi; $board3 = $hasit{$linkit}; $boardday = $hasit{$todaysactive}; $boardmon = $hasit{$monthsactive}; #### get threads if ($most ne ""){ open(FILE,"$datadir/$most") or die "Fehler $!"; $test4 = ; close(FILE); ($show) = split(/\|/, $test4); $linkever = qq~$show~; } else{ $linkever = qq~$tttxt{'05'}~;} if ($todaysactive ne ""){ open(FILE,"$datadir/$todaysactive.txt") or die "Fehler $!"; $test5 = ; close(FILE); ($show2) = split(/\|/, $test5); $linktoday = qq~$show2~; } else{$linktoday = qq~$tttxt{'07'}~;} if ($monthsactive ne ""){ open(FILE,"$datadir/$monthsactive.txt") or die "Fehler $!"; $test6 = ; close(FILE); ($show3) = split(/\|/, $test6); $linkmonth = qq~$show3~; } else{$linkmonth = qq~$tttxt{'06'}~;} #### } 1;