############################################################################### # 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"; require "$sourcedir/IgnoreUser.pl"; sub Display { fopen(FILE, "$vardir/ignore.txt") || &fatal_error("300 $txt{'106'}: $txt{'23'} ignore.txt"); @ignoretxt = ; fclose(FILE); $ignoretxt = join( "", @ignoretxt ); $ignoretxt =~ s/\n/
/g; my($msf,$mfn,$attachment,$showattach); my $viewnum = $INFO{'num'}; if( $viewnum =~ /\D/ ) { &fatal_error($txt{'337'}); } if( $currentboard eq '' ) { &fatal_error($txt{'1'}); } $maxmessagedisplay ||= 10; my($filetype_info, $filesize_info, $extensions); $extensions = join(" ", @ext); $filetype_info = $checkext == 1 ? qq~$fatxt{'2'} $extensions~ : qq~$fatxt{'2'} $fatxt{'4'}~; $filesize_info = $limit != 0 ? qq~$fatxt{'3'} $limit KB~ : qq~$fatxt{'3'} $fatxt{'5'}~; 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. ## LAST READ MOD ## ($mnum,$tmpa,$tmpa,$tmpa,$mdate,$mreplies) = split(/\|/,$yyThreadLine); $mreplies++; &dumplog($mnum,$date,$mreplies); ## /LAST READ MOD ## # Add 1 to the number of views of this thread. if(fopen(FILE, "$datadir/$viewnum.data")) { $tmpa = ; @other_stuff = ; fclose(FILE); chomp $tmpa; } 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~; print FILE qq~\n~; print FILE @other_stuff; 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/)/; } $notify = ''; # Update notification file that the thread has been viewed. if($enable_notification && $username ne 'Guest') { my $startnum = $start || '0'; $notify = qq~$img{'notify'}$menusep~; if(-e("$datadir/$viewnum.mail")) { my $i = 0; my $found = 0; fopen(FILE, "$datadir/$viewnum.mail"); @mails = ; fclose(FILE); foreach $curmail (@mails) { chomp $curmail; ($curmail, $mail_sent, $notify_type) = split(/\|/,$curmail); if ($curmail eq $settings[2]) { $notify = qq~$img{'notify'}$menusep~; if ($mail_sent == 1) {$mail_sent = 0; $found = 1;} } $mails[$i] = "$curmail|$mail_sent|$notify_type\n"; $i++; } if ($found == 1) { fopen(FILE, ">$datadir/$viewnum.mail"); print FILE @mails; fclose(FILE); } } } &jumpto; # create the jumpto list # look for thread header for this topic if (-e "$datadir/$viewnum.head") { require "$sourcedir/ThreadHeader.pl"; &ShowHeader($viewnum);} $yymain .= qq~ ~; # Build the page links list. my($pageindex, $all, $allselected); $max = $mreplies + 1; if ($INFO{'start'} eq "all") { $maxmessagedisplay = $max; $all = 1; $allselected = "selected"; $start = 0 } else { $start = $INFO{'start'} || 0; } $start = $start > $mreplies ? $mreplies : $start; $start = ( int( $start / $maxmessagedisplay ) ) * $maxmessagedisplay; $pagenumb = int(($max - 1) / $maxmessagedisplay) + 1; $lastptn = ($pagenumb - 1) * $maxmessagedisplay; if($pagenumb < 2 && !$all) { $pageindex = 1; } else { $startpage = 0; $prevpage = $start - $maxmessagedisplay; $nextpage = $start + $maxmessagedisplay; $pageindex .= qq~$pagenumb  ~; if($start < $maxmessagedisplay) { $pageindex .= qq~~; } else { $pageindex .= qq~~; } $pageindex .= qq~
~; if($start >= $lastptn) { $pageindex .= qq~~; } else { $pageindex .= qq~~; } } foreach (@censored) { ($tmpa,$tmpb) = @{$_}; $msubthread =~ s~\Q$tmpa\E~$tmpb~gi; } if ($boardlinks == 1) { $blink =~ s~\°~\@~ig; $yymain .= "$blink"; } $curthreadurl = $curposlinks ? qq~$msubthread~ : $msubthread; # Begin addon for boardlinksSP1 $blink = ''; $i=0; $ii=0; while($LinkBoard[$i]) { if ($LinkBoard[$i] eq $currentboard){ if ($ii == 0){ if ( $LinkURL[$i] =~ m/\°/ ) { $blink .= qq~$LinkName[$i]~; } else { $blink .= qq~$LinkName[$i]~; } $ii=1; } else { if ( $LinkURL[$i] =~ m/\°/ ) { $blink .= qq~$blinkstxt{'13'}$LinkName[$i]~; } else { $blink .= qq~$blinkstxt{'13'}$LinkName[$i]~; } } } $i++; } if ($blink ne ''){ $blink = qq~
$blinkstxt{'12'}$boardname
$blink


~; } if ($boardlinks != 1) { $blink =~ s~\°~\@~ig; $yymain .= "$blink"; } # End addon for boardlinksSP1 # Create next/prev links fopen(LISTS, "$boardsdir/$INFO{'board'}.txt"); @boardtopics = ; seek LISTS, 0, 0; my $found; my $name = $INFO{'num'}; my $bcount = 0; $CurrentPosition = -1; while($ThreadNum = ) { ++$CurrentPosition; $boardtopics[$bcount] = $ThreadNum; $bcount++; if ($ThreadNum =~ m/\A$name/o) { $found = 1; last; } } fclose(LISTS); $previous = $boardtopics[$CurrentPosition-1]; $next = $boardtopics[$CurrentPosition+1]; @prevthread = split(/\|/, $previous); $goprevious = $prevthread[0]; @nextthread = split(/\|/, $next); $gonext = $nextthread[0]; @getlastthread = @boardtopics; $lastthread = pop(@getlastthread); @lasttopic = split(/\|/, $lastthread); $endthread2 = $lasttopic[0]; if($found) { $prevtopic = "$cgi;action=display;num=$goprevious"; $nexttopic = "$cgi;action=display;num=$gonext"; $endthread = "$cgi;action=display;num=$endthread2"; } if( $endthread eq $prevtopic && $gonext eq "") { $nav = qq~ $txt{'766'} | $txt{'767a'} | $txt{'766'} »~; } if($endthread eq $prevtopic && $gonext ne "") { $nav = qq~ $txt{'766'} | $txt{'767a'} | $txt{'767'} »~; } if ( $endthread ne $prevtopic && $gonext eq "") { $nav = qq~ $txt{'768'} | $txt{'767a'} | $txt{'766'} »~; } if ($endthread ne $prevtopic && $gonext ne "") { $nav = qq~ $txt{'768'} | $txt{'767a'} | $txt{'767'} »~; } if(!-e ("$vardir/$viewnum.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($msubthread|$date); $ratelink = qq~$scripturl?board=$currentboard;action=display;num=$viewnum~; fopen( FILE, ">$vardir/$viewnum.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) { if(-e ("$vardir/$viewnum.rate")) { $admin_rate = qq~$img{'rem_rating'}~; } else { $admin_rate = qq~$img{'add_rating'}~; } } $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'})
~; if(-e ("$vardir/$viewnum.rate")) { @rateinfo = (); fopen(RATEFILEREAD,"$vardir/$viewnum.rate"); @rateinfo = ; $lines = @rateinfo; fclose(RATEFILEREAD); chomp @rateinfo; ($thisname, $dummy) = split(/\|/,$rateinfo[1]); $thisuser = $username; if($thisuser eq "Guest") { $thisuser = $user_ip } $totalrate = 0; $raters = $lines - 5; if($raters > 0) { for($i=5; $i < $lines; $i++) { ($thisrater, $thisrate) = split(/\|/,$rateinfo[$i]); if($thisuser eq $thisrater) { $intrate = int($thisrate); $check[$intrate] = "selected"; } $totalrate = $totalrate + $thisrate; } $therate = sprintf ("%.2f", ($totalrate/$raters)); } else { $therate = "0.00" } ($rating, $clicks) = split(/\|/,$rateinfo[3]); $barrate = $rating * 10; $ratebar = ""; $ratebar1 = ""; $ratebar2 = ""; $barchart = int($barrate); $barchart1 = 100 - $barchart; if ($barchart < 1) {$ratebar = "$ratebar";} else { $ratebar = qq~~; } if ($barchart > 99) {$ratebar1 = "$ratebar1";} else { $ratebar1 = qq~~; } $ratebar2 = qq~$ratebar$ratebar1~; $yymain .= qq~
  ~; if($username ne "Guest" || $guest_rate) { if($mstate == 0) { $yymain .= qq~ ~; } else { $yymain .= qq~ ~; } } else { $yymain .= qq~ ~; } $yymain .= qq~
  $ratetxt{'70'}:
$txt{'456'} $ratetxt{'21'} $ratetxt{'02a'}: $therate $ratebar2
$ratetxt{'05'}: $raters
~; } # 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; $yymain .= qq~
~; # 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, $msf, $mfn) = split(/[\|]/, $_); # Should we show an attachment file? if( $msf && $mfn && $msf ne "" && $mfn ne "") { if (-e ("$upload_dir/$mfn")) { if(-e ("$upload_dir/log/$mfn.cnt")) { open(COUNT, "$upload_dir/log/$mfn.cnt"); $count = ; close(COUNT); chomp $count; if($count > 0) { $dcounter = qq~($fatxt{'49a'}: $count)~; } else { $dcounter = ""; } } else { $dcounter = ""; } $attachment = qq~ $mfn $dcounter~; if(($mfn =~ /(jpg|gif|bmp|png|jpeg)$/i) && ($amdisplaypics == 1)) { $showattach = qq~
~; } else { $showattach = ''; } } else { $attachment = qq~ $mfn $fatxt{'1'}~; $showattach = ''; } } else { $attachment = ''; $showattach = ''; } # Should we show "last modified by?" # 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); $moodgif = ""; if(-e ("$memberdir/$musername.mim")) { fopen(FILE,"$memberdir/$musername.mim"); @mymood = ; fclose(FILE); chomp $mymood; $thistime = time; $moodgif = ""; if(($thistime-$mymood[1]) < 86400) { if(-e ("$sourcedir/Karma.pl")) { $moodgif .= qq~
~; } $moodgif .= qq~$mimtxt{'02'}

~; } } 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}; $krititleinfo = $krititleinfo{$musername}; $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'}~; if($allowpstlnk) { $sendm .= qq~$menusep$galltxt{'37'}~; } } $usernamelink = $link{$musername}; if($showpostcount==1 || $settings[7] eq 'Administrator' || $settings[7] eq 'Global Moderator'){ $postinfo = qq~$txt{'26'}: $userprofile[6]
~; } $memail = $userprofile[2]; $krealname=$realname; 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; } $realname=$krealname; # 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. &OnMyIgnoreList($musername); $ignimg=""; $status="0"; if($userprofile[7] eq 'Global Moderator' || $userprofile[7] eq 'Administrator' || exists ($moderators{$useraccount{$musername}})){ $status="1"} if ($result eq "no" || $status eq "1") { $message = $postmessage; # put the message back into the proper variable to do ubbc on it if($username ne 'Guest') {$ignimg = qq~$igntxt{'2'}$igntxt{'2a'}~;} } else { $message = $ignoretxt; if($username ne 'Guest') {$ignimg = qq~$igntxt{'3'}$igntxt{'3a'}~;} } if($userprofile[7] eq 'Global Moderator' || $userprofile[7] eq 'Administrator' || exists ($moderators{$useraccount{$musername}})){ $ignimg="";} &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 $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~ $krititleinfo

$moodgif $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

~; } $yymain .= qq~ $userprofile[11] $postinfo ~; require "$sourcedir/ExtendedProfiles.pl"; $yymain .= ext_viewinposts($musername) . qq~
$msub  $attachment
« $counterwords $txt{'30'}: $messdate »
~; if ($mstate != 1) { $yymain .= qq~ $rtm{'22'} $rtm{'22'} $menusep $ignimg$menusep $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
$showattach $userprofile[5]
~; $counter++; } $yymain .= qq~
$txt{'139'}: $pageindex $replybutton$pollbutton$notify$menusep $img{'sendtopic'}$menusep $img{'print'}

$mbname -> $cat -> $boardname -> $curthreadurl


~; $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'} $menusep$admin_rate ~; if (!-e "$datadir/$viewnum.head") { $yymain .= qq~ $img{'admin_header'}~;} $yymain .= qq~
~; } 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
~; ### Quick Reply Box 1.3 ### # MBCO2 Reply access check if ($reply_users{$currentboard} || $reply_groups{$currentboard}) { my $access = &AccessCheck($currentboard, 2) || ""; if ($access eq "denied") {$enable_quickreply = 0;} } if ($username ne "Guest" && $mstate != 1 && $enable_quickreply == 1) { $yymain .= qq~
$qrb_txt{'2'}
~; 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~ ~; if ($allowattach == 1 && (($allowguestattach == 0 && $username ne 'Guest') || $allowguestattach == 1)) { $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'}:
$fatxt{'6'}
$filetype_info
$filesize_info
 
~; } ### Quick Reply Box 1.3 ### $yytitle = $msubthread; &template; exit; } 1;