1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| RSS REST API SERVER CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your api.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| ['apiurl'] The full API Base URL.
| ['feedsurl'] The local Feeds URL.
| ['hostname'] The hostname of your database server.
| ['username'] The username used to connect to the database
| ['password'] The password used to connect to the database
| ['database'] The name of the database you want to connect to
| ['dbdriver'] The database driver. e.g.: mysqli.
| Currently supported:
| cubrid, ibase, mssql, mysql, mysqli, oci8,
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
| NOTE: Disabling this will also effectively disable both
| $this->db->last_query() and profiling of DB queries.
|
| The $query_builder variables lets you determine whether or not to load
| the query builder class.
*/
$query_builder = TRUE;
# backend config settings
#-------------------------
# installation
$config['newsbeuter']['be']['path'] = '/var/www/localhost/nbreader';
#see also config.php, $config['base_url']
//$config['newsbeuter']['be']['base_url'] = 'http://localhost/nbreader';
//$config['newsbeuter']['be']['base_url'] = 'http://'.$_SERVER['SERVER_ADDR'].'/nbreader';
$config['newsbeuter']['be']['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/rss';
if ( ! empty($_SERVER['NBREADER_IS_REWRITE']) &&
$_SERVER['NBREADER_IS_REWRITE'] === 'on')
{
$config['newsbeuter']['be']['rss_api_url'] = $config['newsbeuter']['be']['base_url'].'/api/rss';
} else {
$config['newsbeuter']['be']['rss_api_url'] =
$config['newsbeuter']['be']['base_url'].'/index.php?/api/rss';
}
# basic js config data
$jsconf = array();
$jsconf['version'] = '';
$jsconf['apiurl'] = $config['newsbeuter']['be']['rss_api_url'];
$jsconf['nodes'] = 'collapseOne';
$jsconf['rssactive'] = 'rssactive';
$jsconf['list'] = 'a';
$config['newsbeuter']['fe']['jsconf'] = $jsconf;
# computed paths, generally not be changed
$config['newsbeuter']['be']['confpath'] = $config['newsbeuter']['be']['path'].'/config';
$config['newsbeuter']['be']['confdb'] = $config['newsbeuter']['be']['confpath'].'/urls.db';
$config['newsbeuter']['be']['varpath'] = $config['newsbeuter']['be']['path'].'/var/newsbeuter';
$config['newsbeuter']['be']['dbpath'] = $config['newsbeuter']['be']['varpath'].'/db';
$config['newsbeuter']['be']['datapath'] = $config['newsbeuter']['be']['varpath'].'/data';
# repetition
$config['newsbeuter']['be']['db'] = array(
'dsn' => '',
'hostname' => '',
'username' => '',
'password' => '',
'database' => $config['newsbeuter']['be']['confdb'],
'dbdriver' => 'sqlite3',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'autoinit' => TRUE,
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
# frontend config
$config['newsbeuter']['db'] = array(
'dsn' => '',
'hostname' => '',
'username' => '',
'password' => '',
'database' => $config['newsbeuter']['be']['dbpath'].'/.placeholder.db',
'dbdriver' => 'sqlite3',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'autoinit' => TRUE,
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
|