############################################################################### # Printpage.pl # ############################################################################### # YaBB: Yet another Bulletin Board # # Open-Source Community Software for Webmasters # # Version: YaBB 3.0 Beta # # Packaged: October 05, 2010 # # Distributed by: http://www.yabbforum.com # # =========================================================================== # # Copyright (c) 2000-2010 YaBB (www.yabbforum.com) - All Rights Reserved. # # Software by: The YaBB Development Team # # with assistance from the YaBB community. # ############################################################################### $printpageplver = 'YaBB 3.0 Beta $Revision: 328 $'; if ($action eq 'detailedversion') { return 1; } sub Print_IM { my (@threads,$boxtitle,$type); if ($INFO{'caller'} == 1) { @threads = &read_DBorFILE(0,'',$memberdir,$username,'msg'); $boxtitle = $maintxt{'316'}; $type = $maintxt{'318'}; } elsif ($INFO{'caller'} == 2) { @threads = &read_DBorFILE(0,'',$memberdir,$username,'outbox'); $boxtitle = $maintxt{'320'}; $type = $maintxt{'324'}; } else { @threads = &read_DBorFILE(0,'',$memberdir,$username,'imstore'); $boxtitle = $load_imtxt{'46'}; $type = "$maintxt{'318'}/$maintxt{'324'}"; } ### Lets output all that info. ### $output = qq~
| $mbname | |
|
$scripturl
$load_imtxt{'71'} $boxtitle $maintxt{'30'} $date |
|
|
$maintxt{'70'}: $threadtitle $type $threadposter $maintxt{'30'} $threaddate $threadpost |
| $yycopyright |
| $mbname | |
|
$scripturl
$cat >> $boardname >> $messagetitle $scripturl?num=$num $maintxt{'195'} $startedby $maintxt{'30'} $startedon |
|
|
$maintxt{'196'}: $threadtitle $maintxt{'197'} $threadposter_realname $maintxt{'30'} $threaddate
$threadpost~;
chomp $attachments;
if ($attachments) {
# store all downloadcounts in variable
if (!%attach_count) {
my ($atfile,$atcount);
foreach (&read_DBorFILE(1,'',$vardir,'attachments','txt')) {
(undef, undef, undef, undef, undef, undef, undef, $atfile, $atcount) =split(/\|/, $_);
$attach_count{$atfile} = $atcount;
}
$attach_count{'no_attachments'} = 1 if !%attach_count;
}
my $attachment = '';
my $showattach = '';
foreach (split(/,/, $attachments)) {
$_ =~ /\.(.+?)$/;
my $ext = lc($1);
unless (exists $attach_gif{$ext}) {
$attach_gif{$ext} = ($ext && -e "$forumstylesdir/$useimages/$ext.gif") ? "$ext.gif" : "paperclip.gif";
}
my $filesize = -s "$uploaddir/$_";
if ($filesize) {
if ($_ =~ /\.(bmp|jpe|jpg|jpeg|gif|png)$/i && $amdisplaypics == 1) {
$imagecount++;
$showattach .= qq~ / /g;
}
$output .= qq~
$attachment $showattach~; } $output .= qq~ |
| $yycopyright |
|
|
|
|
|
' . dopre($1) . ''~iseg; $threadpost =~ s~\[flash=(\S+?),(\S+?)\](\S+?)\[/flash\]~$3~isg; $threadpost =~ s~\{\{~\[~g; $threadpost =~ s~\}\}~\]~g; if ($threadpost =~ m~\[table\]~i) { $threadpost =~ s~\n{0,1}\[table\]\n*(.+?)\n*\[/table\]\n{0,1}~