]>
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 ################################################################################
23 my $null = $0; $null =~ s/\\/\//g
; # for win :-(
24 $Bin = ($null =~ /^(.*)\/.*$/)?
$1 : '.';
25 $Shared = "$Bin/../shared";
26 $Config = "$Bin/config";
27 $Script = ($null =~ /^.*\/(.*)$/)?
$1 : $null;
30 # $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.';
31 # $Config = "$Bin/../../daten/forum/config";
32 # $Shared = "$Bin/../../cgi-shared";
33 # $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null;
36 # setting umask, remove or comment it, if you don't need
41 use CGI
::Carp
qw(fatalsToBrowser);
46 use Template
::Posting
;
55 $VERSION = do { my @r =(q
$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x
$#r, @r };
62 my $conf = read_script_conf
($Config, $Shared, $Script);
64 my $show = $conf -> {show
};
65 my $show_forum = $show -> {Forum
};
66 my $show_posting = $show -> {Posting
};
67 my $cgi = $show -> {assign
} -> {cgi
};
68 my $tree = $show -> {assign
} -> {thread
};
69 my $adminDefault = read_admin_conf
($conf -> {files
} -> {adminDefault
});
71 my $forum_file = $conf -> {files
} -> {forum
};
72 my $message_path = $conf -> {files
} -> {messagePath
};
74 my ($tid, $mid) = (param
($cgi -> {thread
}), param
($cgi -> {posting
}));
76 if (defined ($tid) and defined ($mid)) {
77 print_posting_as_HTML
(
79 $show_posting -> {templateFile
},
80 { assign
=> $show_posting -> {assign
},
83 adminDefault
=> $adminDefault,
84 messages
=> $conf -> {template
} -> {messages
},
85 form
=> $show_posting -> {form
},
89 cachepath
=> $conf -> {files
} -> {cachePath
}
97 $show_forum -> {templateFile
},
98 { assign
=> $show_forum -> {assign
},
99 adminDefault
=> $adminDefault,
108 ### end of fo_view.pl ##########################################################
patrick-canterino.de