############################################################################### # MessageIndex.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 # ############################################################################### $messageindexplver = "1 Gold - SP 1.3"; sub MessageIndex { my $start = int( $INFO{'start'} ) || 0; my( $bdescrip, $counter, $buffer, $pages, $showmods, $mnum, $msub, $mname, $memail, $mdate, $mreplies, $musername, $micon, $mstate, $dlp, $threadlength, $threaddate ); my( @boardinfo, @threads ); my( $threadcount, $messagecount, $lastposttime, $lastposter ) = &BoardCountGet($currentboard); my $maxindex = $INFO{'view'} eq 'all' ? $threadcount : $maxdisplay; # Open and quickly read the current board thread list. # Skip past threads until we reach the "page" we want. fopen(FILE, "$boardsdir/$currentboard.txt") || &fatal_error("300 $txt{'106'}: $txt{'23'} $currentboard.txt"); @threadlist = ; @threadlist2 = ''; fclose(FILE); # Get sort order and date mask $default_sort = ""; $default_mask = ""; if (-e "$boardsdir/$currentboard.opt" ) { require "$boardsdir/$currentboard.opt"; } my $sortmode = $INFO{'sort'} || $default_sort; my $datemask = $INFO{'date'} || $default_mask; if ($FORM{'sortmode'}) { $sortmode = $FORM{'sortmode'}; } if ($FORM{'datemask'}) { $datemask = $FORM{'datemask'}; } if ($sortmode eq "rating" && $enable_topicrating != 1) { $sortmode = "";} # Highlight current sort order and date mask my ( $sort1, $sort2, $sort3, $sort4, $sort5, $sort6, $sort7, $sort8 )= (); if ($sortmode eq "subject") { $sort2 = " selected" } elsif ($sortmode eq "created") { $sort3 = " selected" } elsif ($sortmode eq "author") { $sort4 = " selected" } elsif ($sortmode eq "last") { $sort5 = " selected" } elsif ($sortmode eq "replies") { $sort6 = " selected" } elsif ($sortmode eq "views") { $sort7 = " selected" } elsif ($sortmode eq "rating") { $sort8 = " selected" } elsif ($sortmode eq "none") { $sort1 = " selected" } else { $sort1 = " selected"; $sortmode = ""; } my ( $mask1, $mask2, $mask3, $mask4, $mask5, $mask6, $mask7 )= (); if ($datemask eq "today") { $mask1 = " selected" } elsif ($datemask eq "2") { $mask2 = " selected" } elsif ($datemask eq "5") { $mask3 = " selected" } elsif ($datemask eq "10") { $mask4 = " selected" } elsif ($datemask eq "20") { $mask5 = " selected" } elsif ($datemask eq "30") { $mask6 = " selected" } elsif ($datemask eq "all") { $mask7 = " selected" } else { $mask7 = " selected"; $datemask = ""; } # Mask Old Threads my @tmplist = (); if ( $datemask ne "" && $datemask ne "all") { $date2 = $date; if ($datemask == "today") {$days = "0";} else {$days = $datemask; } for($i=0;$i<$threadcount;$i++) { ($dummy, $dummy, $dummy, $dummy, $date1, $dummy) = split( /\|/, $threadlist[$i], 6 ); &calcdifference; if ($result <= $days) {$tmplist[++$#tmplist] = $threadlist[$i];} } @threadlist = @tmplist; $threadcount = $#threadlist + 1; } # Sort list if ($sortmode ne "" && $sortmode ne "none" && $threadcount > 0) { @tmplist = @threadlist; $date2 = $date; for($i=0;$i<$threadcount;$i++) { ($mnum, $msub, $mname, $dummy, $mdate, $mreplies, $dummy) = split( /\|/, $threadlist[$i], 7 ); if ($sortmode eq "subject") { $tmplist[$i] = $msub."|".$threadlist[$i]; } elsif ($sortmode eq "created") { fopen(FILE, "$datadir/$mnum.txt"); $tmpa = ; fclose(FILE); ($dummy, $dummy, $dummy, $date1, $dummy) = split(/\|/, $tmpa, 5); &calcdifference; $tmplist[$i] = $result."|".$threadlist[$i]; } elsif ($sortmode eq "author") { $tmplist[$i] = $mname."|".$threadlist[$i]; } elsif ($sortmode eq "last") { $date1 = $mdate; &calcdifference; $tmplist[$i] = $result."|".$threadlist[$i]; } elsif ($sortmode eq "replies") { $tmplist[$i] = $mreplies."|".$threadlist[$i]; } elsif ($sortmode eq "views") { if( -e "$datadir/$mnum.data" ) { fopen(FILE, "$datadir/$mnum.data"); $tmpa = ; fclose(FILE); ($views, $dummy) = split(/\|/, $tmpa, 2); $views = $views ? $views - 1 : 0; } else { $views = "0"; } $tmplist[$i] = $views."|".$threadlist[$i]; } elsif ($sortmode eq "rating") { if( -e "$datadir/$mnum.data" ) { fopen(FILE, "$datadir/$mnum.data"); $tmpa = ; fclose(FILE); ($dummy, $dummy, $rate, $dummy) = split( /\|/, $tmpa, 4 ); if ($rate eq "") { $rate = "0"; } } else { $rate = "0"; } $tmplist[$i] = $rate."|".$threadlist[$i]; } } if ($sortmode eq "subject" || $sortmode eq "author") { @sortlist = sort{uc($a) cmp uc($b)} (@tmplist); } elsif ($sortmode eq "created" || $sortmode eq "last") { @sortlist = sort{$a<=>$b} (@tmplist); } else { @sortlist = sort{$b<=>$a} (@tmplist); } for($i=0;$i<$threadcount;$i++) { ($dummy, $tmplist[$i]) = split(/\|/, $sortlist[$i], 2); $threadlist[$i] = $tmplist[$i]."\n"; } chomp(@threadlist); } if ($sortmode eq "$default_sort") {$sortmode = "";} if ($sortmode ne "" ) {$sortmode = ";sort=".$sortmode;} if ($datemask eq "$default_mask") {$datemask = "";} if ($datemask ne "") {$datemask = ";date=".$datemask;} # Make sure the starting place makes sense. if( $start > $threadcount ) { $start = int( $threadcount % $maxindex ) * $maxindex; } elsif( $start < 0 ) { $start = 0; } # There are three kinds of lies: lies, damned lies, and statistics. # - Mark Twain # Construct the page links for this board. $indexdisplaynum = 3; # max number of pages to display $tmpa = 1; $tmpx = int( $threadcount / $maxindex ); if ($start >= (($indexdisplaynum-1) * $maxindex)) { $startpage = $start - (($indexdisplaynum-1) * $maxindex); $tmpa = int( $startpage / $maxindex ) + 1; } if ($threadcount >= $start + ($indexdisplaynum * $maxindex)) { $endpage = $start + ($indexdisplaynum * $maxindex); } else { $endpage = $threadcount } if ($startpage > 0) { $pageindex = qq~1 ... ~; } if ($startpage == $maxindex) { $pageindex = qq~1 ~;} for( $counter = $startpage; $counter < $endpage; $counter += $maxindex ) { $pageindex .= $start == $counter ? qq~$tmpa ~ : qq~$tmpa ~; ++$tmpa; } $tmpx = $threadcount - 1 - $maxindex; $outerpn = int($tmpx / $maxindex); $lastpn = int(($threadcount - 1) / $maxindex) + 1; $lastptn = ($lastpn - 1) * $maxindex; if ($endpage < $threadcount - $maxindex ) {$pageindexadd = qq~ ... ~;} if ($endpage != $threadcount) {$pageindexadd .= qq~ $lastpn~;} $pageindex .= $pageindexadd; # Determine what category we are in. fopen(FILE, "$boardsdir/$currentboard.ctb") || &fatal_error("300 $txt{'106'}: $txt{'23'} $currentboard.ctb"); $cat = ; fclose(FILE); fopen(FILE, "$boardsdir/$cat.cat") || &fatal_error("300 $txt{'106'}: $txt{'23'} $cat.cat"); $currcat = $cat; $cat = ; fclose(FILE); # Get the board's description fopen(FILE, "$boardsdir/$currentboard.dat") || &fatal_error("300 $txt{'106'}: $txt{'23'} $currentboard.dat"); @boardinfo = ; fclose(FILE); chomp @boardinfo; $bdescrip = $boardinfo[1]; # Sticky Threads fopen(FILE, "$boardsdir/sticky.stk") || &fatal_error("300 $txt{'106'}: $txt{'23'} sticky.stk"); @stickys = ; $stickycount = $#stickys; fclose(FILE); for ($i=0; $i<=$threadcount; $i++) { ($mnum) = split( /\|/, $threadlist[$i] ); $l = 0; $is = 0; foreach $curnum (@stickys) { if ($mnum == $curnum) { $is = 1; $stickylist{$l} = $threadlist[$i]; #splice(@threadlist,$i,1); last; } $l++; } if ($is == 0) { push(@threadlist2,$threadlist[$i]); } } if (!($threadlist2[0])) { shift(@threadlist2); } #now sort the stickys @stickylist2 = sort {$b <=> $a } keys %stickylist; ###Next 2 lines Sticky Group mod $stkynum = ''; if($start < $maxdisplay){ $stkynum = scalar @stickylist2; } for ($i=0; $i<=$stickycount; $i++) { chomp $stickylist{$i}; if ($stickylist{$i}) { unshift(@threadlist2,"$stickylist{$i}\n"); } } $counter = 0; $tmpa = ''; if($counter < $start && ($buffer = $threadlist2[$counter])) { $tmpa = $buffer; $counter++; } while($counter < $start && ($buffer = $threadlist2[$counter])) { $counter++; } $#threads = $maxindex - 1; $curln = $counter; $counter = 0; while( $counter < $maxindex && ( $buffer = $threadlist2[$curln+$counter] ) ) { chomp $buffer; $threads[$counter] = $buffer; $counter++; } $#threads = $counter - 1; # Let's get the info for the first thread in this forum. $tmpa ||= $threads[0]; ($mnum, $msub, $mname, $memail, $mdate, $mreplies, $musername, $micon, $mstate) = split( /\|/, $tmpa ); # Mark current board as seen. &dumplog($currentboard); # Build a list of the board's moderators. if( scalar keys %moderators > 0 ) { if( scalar keys %moderators == 1 ) { $showmods = qq~($txt{'298'}: ~; } else { $showmods = qq~($txt{'299'}: ~; } while( $_ = each(%moderators) ) { &FormatUserName($_); $showmods .= qq~$moderators{$_}, ~; } $showmods =~ s/, \Z/)/; } $notify = ''; # Update notification file that the board has been viewed. if($enable_board_notify && $username ne 'Guest') { $notify = qq~$menusep$img{'notify_b'}~; if(-e("$boardsdir/$currentboard.mail")) { my $i = 0; my $found = 0; fopen(FILE, "$boardsdir/$currentboard.mail"); @mails = ; fclose(FILE); foreach $curmail (@mails) { chomp $curmail; ($curmail, $mail_sent, $notify_type) = split(/\|/,$curmail); if ($curmail eq $settings[2]) { $notify = qq~$menusep$img{'notify_b'}~; if ($mail_sent == 1) {$mail_sent = 0; $found = 1;} } $mails[$i] = "$curmail|$mail_sent|$notify_type\n"; $i++; } if ($found == 1) { fopen(FILE, ">$boardsdir/$currentboard.mail"); print FILE @mails; fclose(FILE); } } } # Load censor list. fopen(FILE,"$vardir/censor.txt"); while( chomp( $buffer = ) ) { ($tmpa,$tmpb) = split(/=/,$buffer); push(@censored,[$tmpa,$tmpb]); } fclose(FILE); # Print the header and board info. $curboardurl = $curposlinks ? qq~$boardname~ : $boardname; $yymain .= qq~ ~; if( $enable_favorites && $enable_favdrop && $username ne 'Guest' ) { require "$sourcedir/Favor.pl"; &favordrop; $yymain .= qq~ ~; } $yymain .= qq~
$favselect
   $mbname
   $cat
   $curboardurl
$showmods
~; if($ShowBDescrip && $bdescrip ne "") { $yymain .= qq~
$bdescrip
~; } $yymain .= qq~
$txt{'139'}: $pageindex ~; if ($username ne 'Guest') { if($showmarkread) { $yymain .= qq~$img{'markboardread'}~; } if($enable_board_notify) { $yymain .= $notify; } } if ($allowauctions{$currentboard}==1){ $yymain .= qq~$menusep$img{'createauction'}~; } $yymain .= qq~ $menusep$img{'newthread'}$menusep$img{'createpoll'} 
~; $stkyshowed = 1; } ###End Sticky Group mod if((-e "$datadir/$mnum.fav") && ($enable_favorites)) { fopen(FILE, "$datadir/$mnum.fav"); @favnames = ; fclose(FILE); foreach $chfav (@favnames) { chomp $chfav; if($username eq $chfav) {$new .= qq~ $fav{'8'}~; last;} } } # Print the thread info. $mydate = &timeformat($mdate); $yymain .= qq~ ~; if($autoapplyrate{$currentboard} == 1 && $viewrateindex{$currentboard} == 1) { $yymain .= qq~ ~; if ($auctionthread eq 1) { $yymain .= qq~ ~; } elsif ($auctionthread eq 0) { $yymain .= qq~ ~; } $yymain .= qq~ ~; } else { $yymain .= qq~ ~; } $yymain .= qq~ ~; ++$counter; } $yymain .= qq~
~; if($autoapplyrate{$currentboard} == 1 && $viewrateindex{$currentboard} == 1) { $yymain .= qq~ ~; if($rategraph{$currentboard} == 1) { $yymain .= qq~~; } else { $yymain .= qq~~; } $yymain .= qq~ ~; if($rategraph{$currentboard} == 1) { $yymain .= qq~~; } else { $yymain .= qq~~; } $yymain .= qq~ ~; } else { $yymain .= qq~ ~; } $yymain .= qq~ ~; ###Start Sticky Group mod if($stkynum){ $yymain .= qq~ ~; } ###End Sticky Group mod # Begin printing the message index for current board. if ($threadcount == 0) { $sortcolspan = 7; if ($enable_topicrating == 1) {++$sortcolspan;} if (($settings[7] eq 'Administrator' && $adminview != 0) || ($settings[7] eq 'Global Moderator' && $gmodview != 0) || (exists $moderators{$username} && $modview != 0)){++$sortcolspan;} $yymain .= qq~ ~; } $counter = $start; foreach( @threads ) { ($mnum, $msub, $mname, $memail, $mdate, $mreplies, $musername, $micon, $mstate) = split( /\|/, $_ ); # Set thread class depending on locked status and number of replies. $threadclass = 'thread'; if( $mstate == 1 ) { $threadclass = 'locked'; } elsif( $mreplies > 24 ) { $threadclass = 'veryhotthread'; } elsif( $mreplies > 14 ) { $threadclass = 'hotthread'; } elsif( $mstate == 0 ) { $threadclass = 'thread'; } foreach $curnum (@stickys) { if ($mnum == $curnum) { if($threadclass eq 'locked') { $threadclass = 'stickylock'; } else { $threadclass = 'sticky'; } } } $auctionthread = 0; if (-e "$datadir/$mnum.auction") { $auctionthread = 1; fopen (FILE, "$datadir/$mnum.auction"); @auctiondata = ; fclose (FILE); $bidduration = $auctiondata[5]; $bidstart = $auctiondata[12]; if (-e "$datadir/$mnum.auctx"){ fopen (FILE, "$datadir/$mnum.auctx"); @extdata = ; fclose (FILE); $extnum = 0; $exttime = 0; foreach $extention(@extdata){ chomp $extention; $extnum++; $exttime = $exttime + $extention; } } $bidtimeleft = 0; my $todaytime = time; $dif = (($todaytime - $bidstart)/86400); if(!$dif) { $dif = 0; } $bidtimeleft = sprintf("%.1f",$bidduration - $dif + $exttime); $calcdif = (($bidduration*86400)-($todaytime - $bidstart)+($exttime*86400)); $bidday = int($calcdif/86400); $calcdif = ($calcdif - ($bidday*86400)); $bidhour = int($calcdif/3600); $calcdif = ($calcdif - ($bidhour*3600)); $bidminute = int($calcdif/60); $calcdif = ($calcdif - ($bidminute*60)); $bidsecond = int($calcdif); if($bidday <= 0){ $duration = ""; } elsif($bidday == 1) { $duration = "$bidday$aucttxt{'10a'} "; } else { $duration = "$bidday$aucttxt{'10a2'} "; } if($bidhour <= 0 && $bidday <= 0){ $duration .= ""; } else { $duration .= "$bidhour$aucttxt{'10c'} "; } if($bidminute <= 0 && $bidhour <= 0){ $duration .= ""; } else { $duration .= "$bidminute$aucttxt{'10d'} "; } if($bidsecond < 0){ $duration .= "$aucttxt{'39a'}"; } else { $duration .= "$bidsecond$aucttxt{'10e'} "; } } $auctlock = 0; $bidcount = 0; $hbuser=""; $hbusername=""; if (-e "$datadir/$mnum.bids"){ fopen (BID, "$datadir/$mnum.bids"); @bids = ; fclose (BID); } if (-e "$datadir/$mnum.auctl" || $bidtimeleft <= 0 ) {$auctionimg = qq~$img{'auctioniconclosed'}~; $auctlock = 1; foreach $bidline(@bids){ chomp $bidline; $bidcount++; @biditem = split(/\|/,$bidline); $hbuser = $biditem[0]; $hbusername = $biditem[1]; } } elsif (-e "$datadir/$mnum.bids"){ foreach $bidline(@bids){ chomp $bidline; $bidcount++; @biditem = split(/\|/,$bidline); $hbuser = $biditem[0]; $hbusername = $biditem[1]; if ($hbuser eq $username) {$lastbid = 1;} else {$lastbid = 0;} } if ($lastbid == 1 ){$auctionimg = qq~$img{'auctionicon'}~; } else {$auctionimg = qq~$img{'auctionnewicon'}~; } } else { if (-e "$datadir/$mnum.bids"){ foreach $bidline(@bids){ chomp $bidline; $bidcount++; @biditem = split(/\|/,$bidline); $hbuser = $biditem[0]; $hbusername = $biditem[1]; } } $auctionimg = qq~$img{'auctionnewicon'}~; } if ($username eq 'Guest'){$auctionimg = ""; } # Decide if thread should have the "NEW" indicator next to it. # Do this by reading the user's log for last read time on thread, # and compare to the last post time on the thread. $dlp = &getlog($mnum); $threaddate = stringtotime($mdate); if( $max_log_days_old && $dlp < $threaddate && $username ne 'Guest' && &getlog("$currentboard--mark") < $threaddate ) { $new = 'new'; } else { $new = ''; } if ($hbuser ne ""){ $lastbidder = qq~$hbusername~; } else { $lastbidder = "$aucttxt{'45'}"; } if ($bidcount > 0){ $numberbids = qq~$bidcount~; } else { $numberbids = "$aucttxt{'45'}"; } if ($auctlock == 1){ $duration = $aucttxt{'39a'}; } if ($auctionthread == 0) {$lastbidder = ""; $numberbids = "";} # Decide if thread should have the "NEW" indicator next to it. # Do this by reading the user's log for last read time on thread, # and compare to the last post time on the thread. $threaddate = stringtotime($mdate); if( $max_log_days_old && $username ne 'Guest' && $threaddate > time-($max_log_days_old*86400) && &getlog($mnum) < $threaddate && &getlog("$currentboard--mark") < $threaddate ) { $new = qq~$txt{'302'}~; } else { $new = ''; } # Load the current nickname of the account name of the thread starter. $micon = qq~~; $mpoll = ""; if (-e "$datadir/$mnum.poll") { $mpoll = qq~$polltxt{'15'}: ~; fopen (FILE, "$datadir/$mnum.poll"); $poll_question = ; fclose (FILE); chomp $poll_question; ($dummy, $poll_locked, $dummy) = split(/\|/, $poll_question, 3); $micon = qq~$img{'pollicon'}~; if ($poll_locked) { $micon = $img{'polliconclosed'}; } else { fopen(FILE, "$datadir/$mnum.polled"); $polled = ; fclose(FILE); $dlp = &getlog($mnum); ($dummy, $dummy, $dummy, $vote_date, $dummy) = split(/\|/, $polled); $vote_date = stringtotime($vote_date); if( $max_log_days_old && $dlp < $vote_date && $username ne 'Guest' && &getlog("$currentboard--mark") < $vote_date ) {$micon = qq~$img{'polliconnew'}~;} } } if( $musername ne 'Guest' && -e "$memberdir/$musername.dat" ) { &LoadUser($musername); $mname = $userprofile{$musername}->[1] || $mname || $txt{'470'}; $mname = qq~$mname~; } else { $mname ||= $txt{'470'}; } # Censor the subject of the thread. foreach (@censored) { ($tmpa,$tmpb) = @{$_}; $msub =~ s~\Q$tmpa\E~$tmpb~gi; } # Decide how many pages the thread should have. $threadlength = $mreplies + 1; $pages = ''; if( $threadlength > $maxmessagedisplay ) { $tmpa = 1; for( $tmpb = 0; $tmpb < $threadlength; $tmpb += $maxmessagedisplay ) { $pages .= qq~$tmpa\n~; ++$tmpa; } $pages =~ s/\n\Z//; $pages = qq~ [ $pages all ]~; } if( fopen(FILE, "$datadir/$mnum.data") ) { $tmpa = ; fclose(FILE); } elsif( -e "$datadir/$mnum.data" ) { &fatal_error("301 $txt{'106'}: $txt{'23'} $mnum.data"); } else { $tmpa = '0'; } ($views, $lastposter) = split(/\|/, $tmpa); if( $lastposter =~ m~\AGuest-(.*)~ ) { $lastposter = $1; } else { unless( $lastposter eq $txt{'470'} ) { $lastposterid = $lastposter; &LoadUser($lastposterid); if($userprofile{$lastposter}->[1]) { $lastposter = qq~$userprofile{$lastposter}->[1]~; } } &LoadUser($lastposter); } $lastpostername = $lastposter || $txt{'470'}; $views = $views ? $views - 1 : 0; if(!-e ("$vardir/$mnum.rate") && $autoapplyrate{$currentboard} == 1) { if(!-e ("$vardir/rateslist.txt")) { fopen(FILE, ">$vardir/rateslist.txt", 1); print FILE "|1|1|1\n"; fclose(FILE); } fopen(FILE, "$vardir/rateslist.txt"); @ratelist = ; $listnum = @ratelist; fclose(FILE); $namestart = ""; $namestart .= qq($msub|$date); $ratelink = qq~$scripturl?board=$currentboard;action=display;num=$mnum~; fopen( FILE, ">$vardir/$mnum.rate", 1); print FILE "$boardname\n"; print FILE "$namestart\n"; print FILE "\n"; print FILE "0.00|0\n"; print FILE "$ratelink\n"; fclose(FILE); fopen(FILE, ">$vardir/rateslist.txt", 1); foreach $currate (@ratelist) { chomp $currate; print FILE "$currate\n"; } print FILE "$viewnum|$username\n"; fclose(FILE); } if($autoapplyrate{$currentboard} == 1 && $viewrateindex{$currentboard} == 1) { @rateinfo = (); fopen(RATEFILEREAD,"$vardir/$mnum.rate"); @rateinfo = ; $lines = @rateinfo; fclose(RATEFILEREAD); chomp @rateinfo; $raters = $lines - 5; ($rating, $clicks) = split(/\|/,$rateinfo[3]); if($rating == 0) { $rating = "0.00" } $barrate = $rating * 10; $ratebar = ""; $ratebar1 = ""; $ratebar2 = ""; $barchart = int($barrate); $ratebar2 .= qq~
 $txt{'70'}$txt{'70'}$txt{'109'} $txt{'110'} $txt{'301'} $txt{'111'}$mbcrate{'04'}$mbcrate{'04'}
  $txt{'70'} $txt{'109'} $txt{'110'} $txt{'301'} $txt{'111'}
 $stickygrp{'1'}

$sorttxt{'4'}

~; if($rategraph{$currentboard} == 1) { if($ratestar{$currentboard} == 1) { if($barchart < 10) { $ratebar2 .= qq~~; } elsif($barchart < 30) { $ratebar2 .= qq~~; } elsif($barchart < 50) { $ratebar2 .= qq~~; } elsif($barchart < 70) { $ratebar2 .= qq~~; } elsif($barchart < 90) { $ratebar2 .= qq~~; } else { $ratebar2 .= qq~~; } } else { $barchart1 = 100 - $barchart; if ($barchart < 1) {$ratebar = "$ratebar";} else { $ratebar = qq~~; } if ($barchart > 99) {$ratebar1 = "$ratebar1";} else { $ratebar1 = qq~~; } $ratebar2 .= qq~~; } } else { if($ratestar{$currentboard} == 1) { if($barchart < 10) { $ratebar2 .= qq~~; } elsif($barchart < 30) { $ratebar2 .= qq~~; } elsif($barchart < 50) { $ratebar2 .= qq~~; } elsif($barchart < 70) { $ratebar2 .= qq~~; } elsif($barchart < 90) { $ratebar2 .= qq~~; } else { $ratebar2 .= qq~~; } } else { $barchart1 = 100 - $barchart; if ($barchart < 1) {$ratebar = "$ratebar";} else { $ratebar = qq~~; } if ($barchart > 99) {$ratebar1 = "$ratebar1";} else { $ratebar1 = qq~~; } $ratebar2 .= qq~~; } } $ratebar2 .= qq~
$ratebar$ratebar1$rating$ratetxt{'05'} $raters$rating$ratetxt{'05'} $raters$rating$ratetxt{'05'} $raters$rating$ratetxt{'05'} $raters$rating$ratetxt{'05'} $raters$rating$ratetxt{'05'} $raters$rating$ratebar$ratebar1
~; } ###Start Sticky Group mod if(($stkynum && ($counter >= $stkynum)) && ($stkyshowed < 1)){ $yymain .= qq~
 $stickygrp{'2'}

$auctionimg
$micon $new $msub $pages $mname $mreplies $views $mydate
$txt{'525'} $lastpostername
$ratebar2
$micon $new $msub $pages~; if($auctionthread == 1){ $yymain .= qq~
$aucttxt{'20a'}: $lastbidder - $aucttxt{'20b'}: $numberbids - $aucttxt{'10b'}: $duration~; } $yymain .= qq~
$mname $mreplies $views $mydate
$txt{'525'} $lastpostername
~; if ($enable_sortbar == 1) { $yymain .= qq~
~; } $yymain .= qq~
~; if ($enable_sortbar == 1) { $yymain .= qq~ ~; &jumpto; } else { $yymain .= qq~ ~; } $yymain .= qq~
$txt{'139'}: $pageindex $sorttxt{'10'}:   $sorttxt{'20'}:   ~; if ($username ne 'Guest') { if($showmarkread) { $yymain .= qq~$img{'markboardread'}~; } if($enable_board_notify) { $yymain .= $notify; } } &jumpto; $yymain .= qq~ $menusep$img{'newthread'}$menusep$img{'createpoll'} 

~; if ($enable_sortbar == 1) { $yymain .= qq~
~; } $yymain .= qq~
$txt{'457'}
$txt{'454'}
$txt{'455'}
$txt{'456'}
$txt{'779'}
$txt{'780'}
$selecthtml
~; ### Quick Reply Box 1.3 ### # MBCO2 Post access check if ($start_users{$currentboard} || $start_groups{$currentboard}) { my $access = &AccessCheck($currentboard, 1) || ""; if ($access eq "denied") {$enable_quickpost = 0;} } if ($username ne "Guest" && $enable_quickpost == 1) { $yymain .= qq~
$qrb_txt{'1'}
~; if ($enable_quicksmilies == 1) { if ($smiliestyle eq 1){$smiliewinlink = "$scripturl?action=smilieput";} else { $smiliewinlink = "$scripturl?action=smilieindex";} $moresmilieslist = ""; $more_smilie_array = ""; $i=0; if ($showadded eq 1){ # show added smilies on smiley bar while($SmilieURL[$i]) { if ($SmilieURL[$i]=~ /\//i) {$tmpurl = $SmilieURL[$i];} else {$tmpurl = qq~$imagesdir/$SmilieURL[$i]~;} $moresmilieslist .= qq~ document.write("+'$SmilieLinebreak[$i] ");\n~; $tmpcode = $SmilieCode[$i]; $tmpcode =~ s/\"/"+'"'+"/g; &FromHTML($tmpcode); $tmpcode =~ s/$/\$/g; $tmpcode =~ s/@/\@/g; $more_smilie_array .= qq~" $tmpcode", ~; $i++; } } if ($showsmdir eq 1){ # show auto smilies on smiley bar opendir(DIR, "$smiliesdir"); @contents = readdir(DIR); closedir(DIR); foreach $line (sort {uc($a) cmp uc($b)} @contents){ ($name, $extension) = split (/\./, $line); if ($extension =~ /gif/i || $extension =~ /jpg/i || $extension =~ /jpeg/i || $extension =~ /png/i ){ if ($line !~ /banner/i) { $moresmilieslist .= qq~ document.write("$name ");\n~; $more_smilie_array .= qq~" [smiley=$line]", ~; $i++ } } } } $more_smilie_array .= qq~""~; $yymain .= qq~ ~; } $yymain .= qq~
$txt{'70'}:
$txt{'297'}: ~; if ($showadded == 3 || ($showadded == 2 && $detachblock == 1) || $showsmdir == 3 || ($showsmdir == 2 && $detachblock == 1)){ $yymain .= qq~ $smiltxt{'1'}~; } $yymain .= qq~
$txt{'72'}:
 
$txt{'131'}:
~; } ### Quick Reply Box 1.3 ### $yytitle = $boardname; &template; exit; } sub MarkRead { # Mark all threads in this board as read. &dumplog("$currentboard--mark"); $yySetLocation = qq~$scripturl~; &redirectexit; } 1;