2 /********************************************************************************
3 * install.d/config.inc.php : configuration file
4 * --------------------------
6 * This file is part of the banana distribution
7 * Copyright: See COPYING files that comes with this distribution
8 ********************************************************************************/
10 require_once("include/misc.inc.php");
11 require_once("include/groups.inc.php");
12 require_once("include/format.inc.php");
13 require_once("include/error.inc.php");
19 var $hdecode = array('from','name','organization','subject');
20 var $parse_hdr = array('content-transfer-encoding', 'content-type', 'date', 'followup-to', 'from',
21 'message-id', 'newsgroups', 'organization', 'references', 'subject', 'x-face');
22 var $show_hdr = array('from', 'subject', 'newsgroups', 'followup', 'date', 'organization', 'references', 'x-face');
31 var $custom = "Content-Type: text/plain; charset=iso-8859-15\nMime-Version: 1.0\nContent-Transfer-Encoding: 8bit\nUser-Agent: Banana @VERSION@\n";
33 var $host = 'news://localhost:119/';
35 var $profile = Array( 'name' => 'Anonymous <anonymouse@example.com', 'sig' => '', 'org' => '',
36 'customhdr' =>'', 'display' => 0, 'lastnews' => 0, 'lang' => 'fr', 'subscribe' => array());
44 if (function_exists('hook_banana')) {
47 $this->_setupProfile();
48 require_once('include/NetNNTP.inc.php');
49 $this->nntp
= new nntp($this->host
);
52 function newSpool($group, $disp=0, $since='') {
53 require_once('include/spool.inc.php');
54 $this->spool
= new BananaSpool($group, $disp, $since);
55 if (!$this->spool
) { error('nntpspool'); }
60 require_once("include/post.inc.php");
61 $this->post
= new BananaPost($id);
64 function _setupProfile()
66 if (function_exists('hook_getprofile')) {
67 $this->profile
= hook_getprofile();
72 setlocale(LC_ALL
, $this->profile
['locale']);
78 switch (basename($_SERVER['SCRIPT_NAME'])) {
80 if (!isset($_SESSION['bananapostok'])) {
81 $_SESSION['bananapostok']=true
;
86 $_SESSION['bananapostok']=true
;
92 'bananashortcuts' => 'bananashortcuts',
94 'bicoltitre' => 'bicoltitre',
95 'bicolvpadd' => 'bicolvpadd',
100 'normal' => 'normal',
102 'unread' => 'unread',
104 'description' => 'description',
106 'subject' => 'subject',
108 'author' => 'author',
109 'nopadd' => 'nopadd',
110 'overview' => 'overview',