]>
git.p6c8.net - selfforum.git/blob - selfforum-cgi/user/fo_view.pl
3 ################################################################################
5 # File: user/fo_view.pl #
7 # Authors: André Malo <nd@o3media.de>, 2001-04-01 #
9 # Description: display the forum main file or a single posting #
11 ################################################################################
14 use vars
qw($Bin $Shared $Script $Config);
17 my $null = $0; $null =~ s/\\/\//g; # for win :-(
18 $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.';
19 $Shared = "$Bin/../shared";
20 $Config = "$Bin/config";
21 $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null;
25 use CGI::Carp qw(fatalsToBrowser);
30 use Template
::Posting
;
32 use CGI
qw(param header);
34 print header
(-type
=> 'text/html');
36 my $conf = read_script_conf
($Config, $Shared, $Script);
38 my $show = $conf -> {show
};
39 my $show_forum = $show -> {Forum
};
40 my $show_posting = $show -> {Posting
};
41 my $cgi = $show -> {assign
} -> {cgi
};
42 my $tree = $show -> {assign
} -> {thread
};
43 my $adminDefault = read_admin_conf
($conf -> {files
} -> {adminDefault
});
45 my $forum_file = $conf -> {files
} -> {forum
};
46 my $message_path = $conf -> {files
} -> {messagePath
};
48 my ($tid, $mid) = (param
($cgi -> {thread
}), param
($cgi -> {posting
}));
50 if (defined ($tid) and defined ($mid)) {
51 print_posting_as_HTML
(
53 $show_posting -> {templateFile
},
54 { assign
=> $show_posting -> {assign
},
57 adminDefault
=> $adminDefault,
58 messages
=> $conf -> {template
} -> {messages
},
59 form
=> $show_posting -> {form
},
69 $show_forum -> {templateFile
},
70 { assign
=> $show_forum -> {assign
},
71 adminDefault
=> $adminDefault,
80 ### end of fo_view.pl ##########################################################
patrick-canterino.de