]>
git.p6c8.net - selfforum.git/blob - selfforum-cgi/user/fo_view.pl
37260e3278e766ab0073c1687877d0caec6eb0f0
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;
28 my $null = $0; #$null =~ s/\\/\//g; # for win :-(
29 $Bin = ($null =~ /^(.*)\/.*$/)?
$1 : '.';
30 $Config = "$Bin/../../../cgi-config/devforum";
31 $Shared = "$Bin/../../../cgi-shared";
32 $Script = ($null =~ /^.*\/(.*)$/)?
$1 : $null;
36 use CGI
::Carp
qw(fatalsToBrowser);
41 use Template
::Posting
;
43 use CGI
qw(param header);
45 print header
(-type
=> 'text/html');
47 my $conf = read_script_conf
($Config, $Shared, $Script);
49 my $show = $conf -> {show
};
50 my $show_forum = $show -> {Forum
};
51 my $show_posting = $show -> {Posting
};
52 my $cgi = $show -> {assign
} -> {cgi
};
53 my $tree = $show -> {assign
} -> {thread
};
54 my $adminDefault = read_admin_conf
($conf -> {files
} -> {adminDefault
});
56 my $forum_file = $conf -> {files
} -> {forum
};
57 my $message_path = $conf -> {files
} -> {messagePath
};
59 my ($tid, $mid) = (param
($cgi -> {thread
}), param
($cgi -> {posting
}));
61 if (defined ($tid) and defined ($mid)) {
62 print_posting_as_HTML
(
64 $show_posting -> {templateFile
},
65 { assign
=> $show_posting -> {assign
},
68 adminDefault
=> $adminDefault,
69 messages
=> $conf -> {template
} -> {messages
},
70 form
=> $show_posting -> {form
},
74 cachefile
=> $conf -> {files
} -> {cacheFile
}
82 $show_forum -> {templateFile
},
83 { assign
=> $show_forum -> {assign
},
84 adminDefault
=> $adminDefault,
93 ### end of fo_view.pl ##########################################################
patrick-canterino.de