]>
git.p6c8.net - selfforum.git/blob - selfforum-cgi/user/fo_view.pl
8da8f6d938b9142d2c0ab9d9bcc96e7ce2670f72
3 ################################################################################
5 # File: user/fo_view.pl #
7 # Authors: André Malo <nd@o3media.de>, 2001-03-31 #
9 # Description: display the forum main file or a single posting #
11 ################################################################################
14 use vars
qw($Bin $Shared $Script);
17 my $null = $0; $null =~ s/\\/\//g; # for win :-(
18 ($Bin) = ($null =~ /^(.*)\/.*$/)? $1 : '.';
19 $Shared = "$Bin/../shared";
20 ($Script) = ($null =~ /^.*\/(.*)$/)? $1 : $null;
24 use CGI::Carp qw(fatalsToBrowser);
28 use autouse
'Template::Forum' => qw(print_forum_as_HTML($$$));
29 use autouse
'Template::Posting' => qw(print_posting_as_HTML($$$));
31 use CGI
qw(param header);
33 print header
(-type
=> 'text/html');
35 my $conf = read_script_conf
($Bin, $Shared, $Script);
37 my $show = $conf -> {show
};
38 my $show_forum = $show -> {Forum
};
39 my $show_posting = $show -> {Posting
};
40 my $cgi = $show -> {assign
} -> {cgi
};
41 my $tree = $show -> {assign
} -> {thread
};
42 my $adminDefault = read_admin_conf
($conf -> {files
} -> {adminDefault
});
44 my $forum_file = $conf -> {files
} -> {forum
};
45 my $message_path = $conf -> {files
} -> {messagePath
};
47 my ($tid, $mid) = (param
($cgi -> {thread
}), param
($cgi -> {posting
}));
49 if (defined ($tid) and defined ($mid)) {
50 print_posting_as_HTML
(
52 $show_posting -> {templateFile
},
53 { assign
=> $show_posting -> {assign
},
56 adminDefault
=> $adminDefault,
57 messages
=> $show_posting -> {messages
},
58 form
=> $show_posting -> {form
},
68 $show_forum -> {templateFile
},
69 { assign
=> $show_forum -> {assign
},
70 adminDefault
=> $adminDefault,
79 ### end of fo_view.pl ##########################################################
patrick-canterino.de