############################################################################### # Display.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 # ############################################################################### $displayplver = "1 Gold - SP 1.3"; sub Display { require "$sourcedir/Title.pl"; my $viewnum = $INFO{'num'}; if( $viewnum =~ /\D/ ) { &fatal_error($txt{'337'}); } if( $currentboard eq '' ) { &fatal_error($txt{'1'}); } $maxmessagedisplay ||= 10; my($buffer,$views,$lastposter,$moderators,$counter,$counterwords,$pageindex,$msubthread,$mnum,$mstate,$mdate,$msub,$mname,$memail,$mreplies,$musername,$micon,$noposting,$threadclass,$notify,$max,$start,$bgcolornum,$windowbg,$mattach,$mip,$mlm,$mlmb,$lastmodified,$postinfo,$star,$sendm,$topicdate); my(@userprofile,@messages,@bgcolors); # Determine what category we are in. fopen(FILE, "$boardsdir/$currentboard.ctb") || &fatal_error("300 $txt{'106'}: $txt{'23'} $currentboard.ctb"); $curcat = ; fclose(FILE); #$curcat = $cat; fopen(FILE, "$boardsdir/$curcat.cat") || &fatal_error("300 $txt{'106'}: $txt{'23'} $cat.cat"); $cat = ; fclose(FILE); # Load the membergroups list. fopen(FILE, "$vardir/membergroups.txt") || &fatal_error("100 $txt{'106'}: $txt{'23'} membergroups.txt"); @membergroups = ; fclose(FILE); # Mark current thread as read. ($mnum,$tmpa,$tmpa,$tmpa,$mdate) = split(/\|/,$yyThreadLine); &dumplog($mnum,$date); # Add 1 to the number of views of this thread. if(fopen(FILE, "$datadir/$viewnum.data")) { $tmpa = ; fclose(FILE); } elsif( -e "$datadir/$viewnum.data" ) { &fatal_error("102 $txt{'106'}: $txt{'23'} $viewnum.data"); } else { $tmpa = '0'; } ($tmpa, $tmpb) = split( /\|/, $tmpa ); $tmpa++; fopen(FILE, "+>$datadir/$viewnum.data") || &fatal_error("103 $txt{'106'}: $txt{'23'} $viewnum.data"); print FILE qq~$tmpa|$tmpb~; fclose(FILE); $views = $tmpa - 1; # Check to make sure this thread isn't locked. ($mnum,$msubthread,$mname,$memail,$mdate,$mreplies,$musername,$micon,$mstate) = split( /\|/, $yyThreadLine ); $noposting = $viewnum eq $mnum && $mstate == 1 ? 1 : 0; # Look for a poll file for this thread. if (-e "$datadir/$viewnum.poll") { $has_poll = 1; } else { $has_poll = 0; } # Get the class of this thread, based on lock status and number of replies. $replybutton = qq~$img{'reply'}~; $pollbutton = qq~$menusep$img{'addpoll'}~; $threadclass = 'thread'; if( $mstate == 1 ) { $threadclass = 'locked'; $replybutton = ""; $pollbutton = ""; } if ($has_poll || $useraddpoll == 0) { $pollbutton = ""; } elsif( $mreplies > 24 ) { $threadclass = 'veryhotthread'; } elsif( $mreplies > 14 ) { $threadclass = 'hotthread'; } elsif( $mstate == 0 ) { $threadclass = 'thread'; } fopen(FILE, "$boardsdir/sticky.stk") || &fatal_error("300 $txt{'106'}: $txt{'23'} sticky.stk"); @stickys = ; fclose(FILE); foreach $curnum (@stickys) { if ($mnum == $curnum) { if($threadclass eq 'locked') { $threadclass = 'stickylock'; } else { $threadclass = 'sticky'; } } } &LoadCensorList; # Load Censor List # Build a list of this 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/)/; } if($enable_notification) { my $startnum = $start || '0'; $notify = qq~$menusep$img{'notify'}~; } &jumpto; # create the jumpto list # Build the page links list. $postdisplaynum = 3; # max number of pages to display $max = $mreplies + 1; $start = $INFO{'start'} || 0; $start = $start > $mreplies ? $mreplies : $start; $start = ( int( $start / $maxmessagedisplay ) ) * $maxmessagedisplay; $tmpa = 1; $tmpx = int( $max / $maxmessagedisplay ); if ($start >= (($postdisplaynum-1) * $maxmessagedisplay)) { $startpage = $start - (($postdisplaynum-1) * $maxmessagedisplay); $tmpa = int( $startpage / $maxmessagedisplay ) + 1; } if ($max >= $start + ($postdisplaynum * $maxmessagedisplay)) { $endpage = $start + ($postdisplaynum * $maxmessagedisplay); } else { $endpage = $max } if ($start != 0) { $previous=$start-$maxmessagedisplay; $pageindex = qq~ $pnptxt{'1'} $pnptxt{'3'} ~; } if ($startpage > 0) { $pageindex .= qq~1 ... ~; } elsif ($startpage == $maxmessagedisplay) { $pageindex .= qq~1 ~;} for( $counter = $startpage; $counter < $endpage; $counter += $maxmessagedisplay ) { $pageindex .= $start == $counter ? qq~$tmpa ~ : qq~$tmpa ~; $tmpa++; } $tmpx = $max - $maxmessagedisplay; $outerpn = int($tmpx / $maxmessagedisplay) + 0; $lastpn = int($mreplies / $maxmessagedisplay) + 1; $lastptn = ($lastpn - 1) * $maxmessagedisplay; if ($endpage < $max - ($maxmessagedisplay) ) {$pageindexadd = qq~ ... ~;} if ($endpage != $max) {$pageindexadd .= qq~ $lastpn~;} if ($start != $lastptn) { $next=$start+$maxmessagedisplay; $pageindexadd .= qq~ $pnptxt{'4'} $pnptxt{'2'}~;} $pageindex .= $pageindexadd; foreach (@censored) { ($tmpa,$tmpb) = @{$_}; $msubthread =~ s~\Q$tmpa\E~$tmpb~gi; } $curthreadurl = $curposlinks ? qq~$msubthread~ : $msubthread; ################################ ### START PREVIOUS/NEXT PLUS ### fopen(FILE, "$boardsdir/$INFO{'board'}.txt"); @threads = ; fclose(FILE); $thisthreadpos = -1; $numthreads = @threads; #work out where this thread is in the list for ($i = 0; $i < $numthreads; $i++) { if ($threads[$i] =~ /^$viewnum/) { $thisthreadpos = $i; } } ($junk, $curtitle) = split(/\|/, $threads[$thisthreadpos]); #do we have a previous or next thread to link to? $previouspos = ($thisthreadpos - 1 >= 0) ? $thisthreadpos - 1 : -1; $nextpos = ($thisthreadpos + 1 < $numthreads) ? $thisthreadpos + 1 : -1; #construct previous link if ($previouspos >= 0) { ($previd, $prevtitle, $junk, $junk, $prevdate) = split(/\|/, $threads[$previouspos]); #should we abbreviate the thread title? if (length($prevtitle) > 20) { $prevtitle = substr($prevtitle, 0, 20) . '...'; } #make sure the link goes to the last page of the thread display fopen(FILE, "$datadir/$previd.txt"); @num_posts = ; fclose(FILE); $num_posts = @num_posts; $num_posts--; #is the previous thread unread? $dlp = &getlog($previd); $threaddate = stringtotime($prevdate); $prevnew = ( $max_log_days_old && $dlp < $threaddate && $username ne 'Guest' && &getlog("$INFO{'board'}--mark") < $threaddate ) ? 'previous_new' : 'previous'; $previouslink = qq~$txt{'768'}: $prevtitle  $prevtitle  «- ~; } else { $previouslink = ''; } #construct next link if ($nextpos > 0) { ($nextid, $nexttitle, $junk, $junk, $nextdate) = split(/\|/, $threads[$nextpos]); #should we abbreviate the thread title? if (length($nexttitle) > 15) { $nexttitle = substr($nexttitle, 0, 20) . '...'; } #make sure the link goes to the last page of the thread display fopen(FILE, "$datadir/$nextid.txt"); @num_posts = ; fclose(FILE); $num_posts = @num_posts; $num_posts--; #is the next thread unread? $dlp = &getlog($nextid); $threaddate = stringtotime($nextdate); $nextnew = ( $max_log_days_old && $dlp < $threaddate && $username ne 'Guest' && &getlog("$INFO{'board'}--mark") < $threaddate ) ? 'next_new' : 'next'; $nextlink = qq~ -»  $nexttitle  $txt{'767'}: $nexttitle~; } else { $nextlink = ''; } $nav = ''; $nav = qq~$previouslink $txt{'33'} $nextlink~; ### END PREVIOUS/NEXT PLUS ##### ################################ $yymain .= qq~
   $mbname
   $cat
   $boardname
$showmods
   $curthreadurl
$nav
$txt{'139'}: $pageindex $replybutton$pollbutton$notify$menusep $img{'sendtopic'}$menusep $img{'print'}
~; if ($has_poll) { require "$sourcedir/Poll.pl"; &display_poll($viewnum); } $yymain .= qq~
   $txt{'29'}  $txt{'118'}: $msubthread  ($txt{'641'} $views $txt{'642'})
~; # Look for an auction file for this thread. if (-e "$datadir/$viewnum.auction") {$auctionthread = 1; } if ($auctionthread) { require "$vardir/auctionsettings.txt"; fopen (FILE, "$datadir/$viewnum.auction"); @auctiondata = ; fclose (FILE); $article = $auctiondata[0]; $askprice = sprintf("%.2f",$auctiondata[1]); $minprice = sprintf("%.2f",$auctiondata[2]); $bidincr = sprintf("%.2f",$auctiondata[3]); $aucttype = $auctiondata[4]; $bidduration = $auctiondata[5]; $bidphone = $auctiondata[6]; $bidcity = $auctiondata[7]; $bidpicture = $auctiondata[8]; $biduser = $auctiondata[9]; $bidusername = $auctiondata[10]; $bidmail = $auctiondata[11]; $bidstart = $auctiondata[12]; chomp $askprice; chomp $minprice; chomp $bidincr; $biduser =~ s/[\n\r]//g; $bidusername =~ s/[\n\r]//g; $bidcity =~ s/[\n\r]//g; $bidphone =~ s/[\n\r]//g; $exttext =""; ($bidpicurl,$picwidth) = split (/\|/,$bidpicture); if (-e "$datadir/$viewnum.auctx"){ fopen (FILE, "$datadir/$viewnum.auctx"); @extdata = ; fclose (FILE); $extnum = 0; $exttime = 0; foreach $extention(@extdata){ chomp $extention; $extnum++; $exttime = $exttime + $extention; } if ($extnum == 1){ $exttext = qq~$extnum $aucttxt{'49a'} $aucttxt{'49'}.~; } elsif ($extnum > 1){ $exttext = qq~$extnum $aucttxt{'49b'} $aucttxt{'49'}.~; } } $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'} "; } if(!$yyUDLoaded{$username}) { &LoadUser($username); } if ($bidphone eq ""){ $bidphone = qq~$aucttxt{'44'}~;} if ($bidcity eq ""){ $bidcity = qq~$aucttxt{'44'}~;} if (-e "$datadir/$viewnum.bids") {$auctionbid = 1; } else {$auctionbid = 0; } fopen (FILE, "$datadir/$viewnum.bids"); @auctionbids = ; fclose (FILE); @auctionbids = reverse @auctionbids; if ($settings[7] eq "Administrator" || $settings[7] eq "Global Moderator" || $biduser eq $username || exists $moderators{$username} ){$bidcontrol =1; } else {$bidcontrol =0;} if ($settings[7] eq "Administrator" || $settings[7] eq "Global Moderator" || exists $moderators{$username} ){$admcontrol =1; } else {$admcontrol =0;} if ($aucttype == 1 ){ $showtype = $aucttxt{'26'};} else { $showtype = $aucttxt{'27'};} if ($bidtimeleft <=0){$auctislocked = 2; $exttext="";} if (-e "$datadir/$viewnum.auctl") { $auctislocked = 1; $exttext="";} if ($bidcontrol==1 && $auctislocked ne 1) { $lockauct = qq~$aucttxt{'30'}~; } if ($bidcontrol==1 && $auctislocked eq 1) { $lockauct = qq~$aucttxt{'31'}~; } if ($bidcontrol==1 && $auctislocked eq 2 && -($bidtimeleft) < $maxextendtime) { $extendauct = qq~$aucttxt{'32'}~; } else {$extendauct="";} if ($bidcontrol==1 ) { $editauct = qq~$aucttxt{'33'}~; } else {$extendauct="";} if ($auctionbid ){ $bidders = qq~ $aucttxt{'16'} $aucttxt{'17'} $aucttxt{'18'} ~; $highestbid =0; foreach $bidline (@auctionbids){ chomp $bidline; @biditem = split(/\|/,$bidline); if($biditem[2] >= $highestbid){ $highestbid = $biditem[2]; $hbuser = $biditem[0]; $hbusername = $biditem[1]; if ($hbuser eq $username) {$viewbid =1;} } if($highestbid < $minprice){ $minbidreached = $aucttxt{'21'}; } else { $minbidreached = ""; } $biddingtime = &timeformat($biditem[3], 1); if ($showsecondcur) { $secbidval = sprintf("%.2f",$biditem[2]*$curfactor); $secondbidval = qq~($secbidval $secondcur)~; } else {$secondbidval = ""; } $bidders .=qq~ $biditem[1] $biditem[2] $aucttxt{'11'} $secondbidval $biddingtime ~; } } if ($auctislocked eq 1) { $duration = $aucttxt{'34a'}; } if ($auctislocked eq 2) { $duration = $aucttxt{'34'}; } if ($aucttype == 1 && $bidcontrol == 0 && $viewbid == 0 && $auctislocked == 0){ $showbidder = qq~$aucttxt{'27a'}~;} else { $showbidder = qq~$hbusername~; } if (!$auctionbid ){$showbidder = $aucttxt{'45'};} if ($showsecondcur) { $seccurval = sprintf("%.2f",$highestbid*$curfactor); $secondval = qq~($seccurval $secondcur)~; } else {$secondval = ""; } my $autobid = sprintf("%.2f",$highestbid+$bidincr); $yymain .= qq~
~; if($username eq "Guest"){ $yymain .= qq~ ~; } elsif($auctislocked > 0){ $yymain .= qq~ ~; } elsif($bidcontrol == 1 && $allowownbids == 0 && $admcontrol == 0){ $yymain .= qq~ ~; } elsif($viewbid == 1 && $allowoverbid == 0 && $admcontrol == 0){ $yymain .= qq~ ~; } else { $yymain .= qq~ ~; } $yymain .= qq~ ~; if ($bidcontrol ==1){ $yymain .= qq~ ~; } if ($aucttype == 0 || $bidcontrol == 1 || $viewbid == 1){ $yymain .= qq~ $bidders~; } $yymain .= qq~
 $img{'auctionicon'} $aucttxt{'15'}
$aucttxt{'6'}: $article $aucttxt{'14'}
$aucttxt{'25'}: $showtype $aucttxt{'14c'}
$aucttxt{'19'}: $bidusername
$aucttxt{'20'}: $highestbid $aucttxt{'11'} $secondval $minbidreached
$aucttxt{'29'}: $showbidder
$aucttxt{'10b'}: $duration $exttext
$aucttxt{'12'}: $bidphone
$aucttxt{'13'}: $bidcity
$aucttxt{'28'}$aucttxt{'43a'}$aucttxt{'43'}
$aucttxt{'11'}
$lockauct
$extendauct
$editauct
~; } $yymain .= qq~
~; # Load background color list. @bgcolors = ( $color{windowbg}, $color{windowbg2} ); $bgcolornum = scalar @bgcolors; @cssvalues = ( "windowbg","windowbg2" ); $cssnum = scalar @bgcolors; if(!$MenuType) { $sm = 1; } $counter = 0; fopen(FILE,"$datadir/$viewnum.txt") || &fatal_error("104 $txt{'106'}: $txt{'23'} $viewnum.txt"); # Skip past the posts in this thread until we reach $start. while($counter < $start && ($buffer = )) { $counter++; } $#messages = $maxmessagedisplay - 1; for($counter = 0; $counter < $maxmessagedisplay && ($buffer = ); $counter++) { $messages[$counter] = $buffer; } fclose(FILE); $#messages = $counter - 1; $counter = $start; # For each post in this thread: foreach (@messages) { undef $realgroup; $windowbg = $bgcolors[($counter % $bgcolornum)]; $css = $cssvalues[($counter % $cssnum)]; chomp; ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $postmessage, $ns, $mlm, $mlmb) = split(/[\|]/, $_); # Should we show "last modified by?" # Begin Time Lock mod if( $mlm && $showmodify && $mlm ne "" && $mlmb ne "") { if( $tllastmodflag == 1) { $tllastmodtimesecs = $tllastmodtime*60; $tlmesstime = stringtotime($mdate) + $tllastmodtimesecs; $tllasttime = stringtotime($mlm); if ( $tlmesstime > $tllasttime ) { $mlm = '-'; $lastmodified = ''; } else { $mlm = &timeformat($mlm); &LoadUser($mlmb); $mlmb = $userprofile{$mlmb}->[1] || $mlmb || $txt{'470'}; $lastmodified = qq~« $txt{'211'}: $mlm $txt{'525'} $mlmb »~; } } else { $mlm = &timeformat($mlm); &LoadUser($mlmb); $mlmb = $userprofile{$mlmb}->[1] || $mlmb || $txt{'470'}; $lastmodified = qq~« $txt{'211'}: $mlm $txt{'525'} $mlmb »~; } } else { $mlm = '-'; $lastmodified = ''; } if ($tlnomodflag == 1) { unless ( ( $settings[7] eq 'Administrator' ) || ( exists $moderators{$username} ) ) { $tlnomodtimesecs = $tlnomodtime*3600*24; $tltime = stringtotime($mdate) + $tlnomodtimesecs; $tlcurrenttime = time + (3600*$timeoffset); if ( $tlcurrenttime > $tltime ) { $nomodallowed = 1; } else {$nomodallowed = 0;} } } if ($tlnodelflag == 1) { unless ( ( $settings[7] eq 'Administrator' ) || ( exists $moderators{$username} ) ) { $tlnodeltimesecs = $tlnodeltime*3600*24; $tldtime = stringtotime($mdate) + $tlnodeltimesecs; $tldcurrenttime = time + (3600*$timeoffset); if ( $tldcurrenttime > $tldtime ) { $nodelallowed = 1; } else {$nodelallowed = 0;} } } # End Time Lock mod $msub ||= $txt{'24'}; $messdate = &timeformat($mdate); if ($settings[7] eq 'Administrator' || $settings[7] eq 'Global Moderator' && $allow_mod == 1) { $mip = $mip } else { $mip = "$txt{'511'}"; } $sendm = ''; # If the user isn't a guest, load his/her info. if($musername ne 'Guest' && ! $yyUDLoaded{$musername} && -e("$memberdir/$musername.dat") ) { &LoadUserDisplay($musername); # If user is not in memory, s/he must be loaded. } my($loccode, $displocal, $dispcountry, $dispcontin, $dispx, $dispy, $dispstate, $dispflag, $disptext); if($yyUDLoaded{$musername}) { @userprofile = @{$userprofile{$musername}}; ($loccode, $displocal, $dispcountry, $dispcontin, $dispx, $dispy, $dispstate) = split(/\|/, $userprofile[15]); if($dispcountry ne "") { if($view_flag) { if($loccode eq "x1") { $dispflag = qq~$dispcountry ~; } elsif($loccode eq "x0") { $dispflag = qq~$dispcountry ~; } else { $dispflag = ""; } } if($view_text) { my($initstat, $namestat, $disploc); if($dispstate ne "") { ($initstat, $namestat) = split(/\,/, $dispstate); } if($displocal ne "") { $disploc = qq~$displocal $initstat~; } if($loccode eq "x1") { $disptext = qq~$disploc~; } elsif($loccode eq "x0") { $disptext = qq~$disploc~; } else { $disptext = ""; } } } $displayname = $userprofile[1]; fopen(NUMBERFILEREAD,"$memberdir/$musername.yam"); @number = ; fclose(NUMBERFILEREAD); chomp @number; if ($musername eq "admin") { $displaynumb = ''; } else { $displaynumb = qq~$membtxt{'23'} $number[0]~; } $star = $memberstar{$musername}; $memberinfo = $memberinfo{$musername}; $titlesettings = &getTitle($musername); if( $titlesettings eq '' ) { $titlesettings = $cuttxt{'2'}; } $memberinfo =~ s~\n~~g; $icqad = $icqad{$musername}; $yimon = $yimon{$musername}; if($username ne 'Guest') { # Allow instant message sending if current user is a member. $sendm = qq~$menusep$img{'message_sm'}~; } $usernamelink = $link{$musername}; $postinfo = qq~$txt{'26'}: $userprofile[6]
~; $memail = $userprofile[2]; if ($disprealinfo == 1) { if ($userprofile[7] ne "Global Moderator" && $userprofile[7] ne "Administrator") { undef $star; require "$sourcedir/MemberGroups.pl"; $realname=$musername; &Load_Real_Group; $realgroup = "$memrealinfo{$realname}"; $star = $memberstar{$musername}; if ($memrealinfo{$realname} eq "$memberinfo{$musername}") { $realgroup = ""; } } } } else { $musername = "Guest"; $displaynumb = ''; $star = ''; $memberinfo = "$txt{'28'}"; $icqad = ''; $yimon = ''; $usernamelink = qq~$mname~; if ($memberinfo eq "$txt{'28'}") { $usernamelink = qq~$mname
~; } $postinfo = ''; @userprofile = (); $displayname = $mname; } # Censor the subject and message. foreach (@censored) { ($tmpa,$tmpb) = @{$_}; $postmessage =~ s~\Q$tmpa\E~$tmpb~gi; $msub =~ s~\Q$tmpa\E~$tmpb~gi; } # Run UBBC interpreter on the message. $message = $postmessage; # put the message back into the proper variable to do ubbc on it &wrap; if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; } &wrap2; $profbutton = $profilebutton && $musername ne 'Guest' ? qq~$img{'viewprofile_sm'}$menusep~ : ''; if($counter != 0) { $counterwords = "$txt{'146'} #$counter"; } else { $counterwords = ""; } # Print the post and user info for the poster. $yymain .= qq~
$usernamelink ~; if($musername ne "Guest") { if($titlesettings eq $cuttxt{'2'}) { $yymain .= qq~ $titlesettings $memberinfo
~; } else { $yymain .= qq~ $memberinfo
$titlesettings
~; } } else { $yymain .= qq~ $memberinfo
~; } if($musername ne "Guest") { if($view_flag) { $yymain .= qq~$dispflag ~; } if($view_text) { $yymain .= qq~$disptext~; } if($view_flag || $view_text) { $yymain .= qq~
~; } $yymain .= qq~ $star
~; if ($view_numb) { $yymain .= qq~ $displaynumb

~; } else { $yymain .= qq~
~; } $yymain .= qq~ $userprofile[13]$userprofile[12]
$userprofile[8] $icqad   $userprofile[10] $yimon   $userprofile[9]
~; } if($musername eq "Guest") { $yymain .= qq~
$img{'email_sm'}

~; } elsif ($userprofile[19] ne "checked" || $settings[7] eq "Administrator" || $settings[7] eq "Global Moderator" || $allow_hide_email ne 1) { $yymain .= qq~ $profbutton$userprofile[4] $img{'email_sm'}$sendm

~; } else { $yymain .= qq~ $profbutton$userprofile[4]$sendm

~; } if (-e "$vardir/usermood.txt") { fopen(FILE, "$memberdir/$musername.rst"); @relationship = ; fclose(FILE); chomp @relationship; $rsttest = $relationship[0]; if($rsttest eq '') {$rsttest = "N/A";} fopen(FILE, "$memberdir/$musername.mod"); @moody = ; fclose(FILE); chomp @moody; $modtest = $moody[0]; if($modtest eq '') {$modtest = "blank";} } $yymain .= qq~ $userprofile[11] $postinfo ~; require "$sourcedir/ExtendedProfiles.pl"; $yymain .= ext_viewinposts($musername) . qq~ ~; if (-e "$vardir/usermood.txt") { if($rsttest eq $relationship[0]) { $yymain .= qq~ $txtrst{'0a'} : $relationship[0]
$musername is $moody[0]

~; } else { $yymain .= qq~ $musername is $moody[0]

~; } } $yymain .= qq~ ~; if (-e "$vardir/levelmeter.txt") { if($musername ne "Guest") { require "$sourcedir/LevelMeter.pl"; if($view_in_posts) { &LevelMeter($musername,$viewnum,$start,$counter); } } } $yymain .= qq~
$msub
« $counterwords $txt{'30'}: $messdate »
~; if ($mstate != 1) { $yymain .= qq~ $img{'replyquote'} ~; if(exists $moderators{$username} || $settings[7] eq 'Administrator' || $settings[7] eq 'Global Moderator' || ($username eq $musername && $nomodallowed == 0)) { $yymain .= qq~ $menusep$img{'modify'}~; } if(exists $moderators{$username} || $settings[7] eq 'Administrator' || $settings[7] eq 'Global Moderator' || ($username eq $musername && $nodelallowed == 0)) { $yymain .= qq~ $menusep$img{'delete'}~; if((exists $moderators{$username} && $mdmod eq 1) || ($settings[7] eq 'Administrator' && $mdadmin eq 1) || ($settings[7] eq 'Global Moderator' && $mdglobal eq 1)) { $yymain .= qq~ ~; } } } $yymain .= qq~

$message
$lastmodified $mip
$userprofile[5]
~; $counter++; } $yymain .= qq~
$txt{'139'}: $pageindex $replybutton$pollbutton$notify$menusep $img{'sendtopic'}$menusep $img{'print'}

~; $yymain .= qq~
~; if(exists $moderators{$username} || $settings[7] eq 'Administrator' || $settings[7] eq 'Global Moderator') { if($settings[7] eq 'Administrator') {$sadminf = $img{'admin_func'};} else {$sadminf = $img{'moderator_func'};} $yymain .= qq~$sadminf  $img{'admin_move'}$menusep ~; if($ss_advanced eq "1") { $yymain .= qq~ $img{'admin_split_splice'}$menusep~; } else { $yymain .= qq~ $img{'admin_split'}$menusep $img{'admin_splice'}$menusep~; } $yymain .= qq~ $img{'admin_rem'}$menusep $img{'admin_lock'}$menusep $img{'admin_sticky'} ~; } if((exists $moderators{$username} && $mdmod eq 1) || ($settings[7] eq 'Administrator' && $mdadmin eq 1) || ($settings[7] eq 'Global Moderator' && $mdglobal eq 1)) { if ($mstate != 1) {$yymain .= qq~~;} } $yymain .= qq~ $selecthtml
$nav
~; $yytitle = $msubthread; &template; exit; } 1;