]>
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
;
16 use vars
qw(@ISA @EXPORT);
19 use Encode
::Plain
; $Encode::Plain
::utf8
= 1;
20 use Posting
::_lib
qw(get_all_threads long_hr_time);
23 use Template
::_thread
;
25 # ====================================================
27 # ====================================================
31 @EXPORT = qw(print_forum_as_HTML);
33 ################################
34 # sub print_forum_as_HTML
37 ################################
39 sub print_forum_as_HTML
($$$) {
40 my ($mainfile, $tempfile, $param) = @_;
41 my $assign = $param -> {assign
};
43 my $template = new Template
$tempfile;
47 unless ($stat = lock_file
($mainfile)) {
49 violent_unlock_file
($mainfile);
59 my $view = get_view_params
({adminDefault
=> $param -> {adminDefault
}
62 $threads = get_all_threads
($mainfile, $param -> {showDeleted
}, $view -> {sortedMsg
});
63 violent_unlock_file
($mainfile) unless (unlock_file
($mainfile));
65 print ${$template -> scrap
($assign -> {mainDocStart
},
66 {$assign -> {loadingTime
} => plain
(long_hr_time
(time)) } )},"\n<dl>";
68 my $tpar = {template
=> $param -> {tree
},
69 cgi
=> $param -> {cgi
},
74 unless ($view -> {sortedThreads
}) {
75 @threads = sort {$b <=> $a} keys %$threads;}
77 @threads = sort {$a <=> $b} keys %$threads;}
80 $tpar -> {thread
} = "$_";
81 print ${html_thread
($threads -> {$_}, $template, $tpar)},"\n",'<dd> </dd>',"\n";}
83 print "</dl>\n",${$template -> scrap
($assign -> {mainDocEnd
})};}
88 # ====================================================
89 # Modulinitialisierung
90 # ====================================================
92 # making require happy
95 # ====================================================
96 # end of Template::Forum
97 # ====================================================
patrick-canterino.de