]>
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);
58 my $view = get_view_params
({adminDefault
=> $param -> {adminDefault
}
61 $threads = get_all_threads
($mainfile, $param -> {showDeleted
}, $view -> {sortedMsg
});
62 violent_unlock_file
($mainfile) unless (unlock_file
($mainfile));
64 print ${$template -> scrap
($assign -> {mainDocStart
},
65 {$assign -> {loadingTime
} => plain
(long_hr_time
(time)) } )},"\n<dl>";
67 my $tpar = {template
=> $param -> {tree
},
68 cgi
=> $param -> {cgi
},
73 unless ($view -> {sortedThreads
}) {
74 @threads = sort {$b <=> $a} keys %$threads;}
76 @threads = sort {$a <=> $b} keys %$threads;}
79 $tpar -> {thread
} = "$_";
80 print ${html_thread
($threads -> {$_}, $template, $tpar)},"\n",'<dd> </dd>',"\n";}
82 print "</dl>\n",${$template -> scrap
($assign -> {mainDocEnd
})};}
87 # ====================================================
88 # Modulinitialisierung
89 # ====================================================
91 # making require happy
94 # ====================================================
95 # end of Template::Forum
96 # ====================================================
patrick-canterino.de