]>
git.p6c8.net - selfforum.git/blob - selfforum-cgi/shared/Template/Forum.pm
3 # ====================================================
4 # Autor: n.d.p. / 2001-01-12
5 # lm : n.d.p. / 2001-01-12
6 # ====================================================
8 # Erzeugung der HTML-Ausgabe der
10 # ====================================================
14 package Template
::Forum
;
17 use Encode
::Plain
; $Encode::Plain
::utf8
= 1;
18 use Posting
::_lib
qw(get_all_threads long_hr_time);
21 use Template
::_thread
;
23 # ====================================================
25 # ====================================================
27 use base
qw(Exporter);
28 @Template::Forum
::EXPORT
= qw(print_forum_as_HTML);
30 ################################
31 # sub print_forum_as_HTML
34 ################################
36 sub print_forum_as_HTML
($$$) {
37 my ($mainfile, $tempfile, $param) = @_;
38 my $assign = $param -> {assign
};
40 my $template = new Template
$tempfile;
44 unless ($stat = lock_file
($mainfile)) {
46 violent_unlock_file
($mainfile);
56 my $view = get_view_params
({adminDefault
=> $param -> {adminDefault
}
59 $threads = get_all_threads
($mainfile, $param -> {showDeleted
}, $view -> {sortedMsg
});
60 violent_unlock_file
($mainfile) unless (unlock_file
($mainfile));
62 print ${$template -> scrap
($assign -> {mainDocStart
},
63 {$assign -> {loadingTime
} => plain
(long_hr_time
(time)) } )},"\n<dl>";
65 my $tpar = {template
=> $param -> {tree
},
66 cgi
=> $param -> {cgi
},
71 unless ($view -> {sortedThreads
}) {
72 @threads = sort {$b <=> $a} keys %$threads;}
74 @threads = sort {$a <=> $b} keys %$threads;}
77 $tpar -> {thread
} = "$_";
78 print ${html_thread
($threads -> {$_}, $template, $tpar)},"\n",'<dd> </dd>',"\n";}
80 print "</dl>\n",${$template -> scrap
($assign -> {mainDocEnd
})};}
85 # ====================================================
86 # Modulinitialisierung
87 # ====================================================
89 # making require happy
92 # ====================================================
93 # end of Template::Forum
94 # ====================================================
patrick-canterino.de