]>
git.p6c8.net - selfforum.git/blob - selfforum-cgi/user/fo_view.pl
42e61532a491b2c35322089e7174ce1768200e4f
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 ################################################################################
22 my $null = $0; $null =~ s/\\/\//g
; # for win :-(
23 $Bin = ($null =~ /^(.*)\/.*$/)?
$1 : '.';
24 $Shared = "$Bin/../shared";
25 $Config = "$Bin/config";
26 $Script = ($null =~ /^.*\/(.*)$/)?
$1 : $null;
29 # $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.';
30 # $Config = "$Bin/../../daten/forum/config";
31 # $Shared = "$Bin/../../cgi-shared";
32 # $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null;
35 # setting umask, remove or comment it, if you don't need
40 use CGI
::Carp
qw(fatalsToBrowser);
45 use Template
::Posting
;
54 $VERSION = do { my @r =(q
$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x
$#r, @r };
61 my $conf = read_script_conf
($Config, $Shared, $Script);
63 my $show = $conf -> {show
};
64 my $show_forum = $show -> {Forum
};
65 my $show_posting = $show -> {Posting
};
66 my $cgi = $show -> {assign
} -> {cgi
};
67 my $tree = $show -> {assign
} -> {thread
};
68 my $adminDefault = read_admin_conf
($conf -> {files
} -> {adminDefault
});
70 my $forum_file = $conf -> {files
} -> {forum
};
71 my $message_path = $conf -> {files
} -> {messagePath
};
73 my ($tid, $mid) = (param
($cgi -> {thread
}), param
($cgi -> {posting
}));
75 if (defined ($tid) and defined ($mid)) {
76 print_posting_as_HTML
(
78 $show_posting -> {templateFile
},
79 { assign
=> $show_posting -> {assign
},
82 adminDefault
=> $adminDefault,
83 messages
=> $conf -> {template
} -> {messages
},
84 form
=> $show_posting -> {form
},
88 cachepath
=> $conf -> {files
} -> {cachePath
}
96 $show_forum -> {templateFile
},
97 { assign
=> $show_forum -> {assign
},
98 adminDefault
=> $adminDefault,
107 ### end of fo_view.pl ##########################################################
patrick-canterino.de