4c3784950e1ff2957007563ed65be3a736144f0c
[phorkie.git] / data / config.default.php
1 <?php
2 /**
3  * phorkie's default configuration.
4  *
5  * DO NOT EDIT THIS FILE but write your changes into data/config.php
6  */
7 $pharFile = \Phar::running();
8 if ($pharFile == '') {
9     $phorkieDir = __DIR__ . '/../';
10     $wwwDir = $phorkieDir . 'www/';
11 } else {
12     //remove phar:// from the path
13     $phorkieDir = dirname(substr($pharFile, 7)) . '/';
14     $wwwDir = $phorkieDir;
15 }
16
17 $GLOBALS['phorkie']['cfg'] = array(
18     'debug'         => false,
19     'git'           => array(
20         'public'    => '%BASEURL%' . 'repos/git/',
21         'private'   => null,
22     ),
23     'cachedir'      => $phorkieDir . 'cache/',
24     'gitdir'        => $wwwDir . 'repos/git/',
25     'workdir'       => $wwwDir . 'repos/work/',
26     'tpl'           => __DIR__ . '/templates/',
27     'baseurl'       => null,
28     'avatars'       => true,
29     'css'           => '',
30     'iconpng'       => '',//phorkie browser icon (favicon)
31     'title'         => 'phorkie',
32     'topbar'        => '',
33     'setupcheck'    => true,
34     'elasticsearch' => null,
35     'index'         => 'new',//"new" or "list"
36     'perPage'       => 10,
37     'defaultListPage' => 'last',//a number or "last"
38     'notificator'   => array(
39         /* send out pingback/webmentions when a remote paste is forked */
40         'linkback'  => true,
41         'webhook'   => array(
42             /* array of urls that get called when
43                a paste is created, edited or deleted */
44         )
45     ),
46 );
47 $GLOBALS['phorkie']['auth'] = array(
48     // 0 = public, no authentication, 1 = protect adds/edits/deletes,
49     // 2 = require authentication
50     'securityLevel'   => 0,
51     'listedUsersOnly' => false,
52     'users'           => array(),             // Array of OpenIDs that may login
53     'anonymousName'   => 'Anonymous',         // Email for non-authenticated commits
54     'anonymousEmail'  => 'anonymous@phorkie', // Email for non-authenticated commits
55 );
56 $GLOBALS['phorkie']['tools'] = array(
57     '\\phorkie\\Tool_Xmllint' => true,
58     '\\phorkie\\Tool_PHPlint' => true,
59 );
60 /**
61  * Array of supported file types / languages.
62  * Key is the file extension
63  */
64 $GLOBALS['phorkie']['languages'] = array(
65     'conf' => array(
66         'title' => 'Configuration',
67         'mime'  => 'text/ini',
68         'geshi' => 'ini',
69         'show'  => false
70     ),
71     'css' => array(
72         'title' => 'CSS',
73         'mime'  => 'text/css',
74         'geshi' => 'css'
75     ),
76     'diff' => array(
77         'title' => 'Diff',
78         'mime'  => 'text/diff',
79         'geshi' => 'diff'
80     ),
81     'htm' => array(
82         'title' => 'HTML',
83         'mime'  => 'text/html',
84         'geshi' => 'xml'
85     ),
86     'html' => array(
87         'title' => 'HTML',
88         'mime'  => 'text/html',
89         'geshi' => 'xml',
90         'show'  => false
91     ),
92     'jpg' => array(
93         'title' => 'JPEG image',
94         'mime'  => 'image/jpeg',
95         'show'  => false
96     ),
97     'ini' => array(
98         'title' => 'Ini',
99         'mime'  => 'text/ini',
100         'geshi' => 'ini'
101     ),
102     'js' => array(
103         'title' => 'Javascript',
104         'mime'  => 'application/javascript',
105         'geshi' => 'javascript'
106     ),
107     'json' => array(
108         'title' => 'Javascript',
109         'mime'  => 'application/javascript',
110         'geshi' => 'javascript',
111         'show'  => false
112     ),
113     'md' => array(
114         'title' => 'Markdown',
115         'mime'  => 'text/x-markdown',
116         'renderer' => '\\phorkie\\Renderer_Markdown'
117     ),
118     'pl' => array(
119         'title' => 'Perl',
120         'mime'  => 'application/x-perl',
121         'geshi' => 'pl'
122     ),
123     'php' => array(
124         'title' => 'PHP',
125         'mime'  => 'text/x-php',
126         'geshi' => 'php'
127     ),
128     'png' => array(
129         'title' => 'PNG image',
130         'mime'  => 'image/png',
131         'show'  => false
132     ),
133     'rb' => array(
134         'title' => 'Ruby/Rails',
135         'mime'  => 'text/x-ruby', /* Is this an acceptable mime type? */
136         'geshi' => 'rails'
137     ),
138     'rst' => array(
139         'title' => 'reStructuredText',
140         'mime'  => 'text/x-rst',
141         'geshi' => 'rst',
142         'renderer' => '\\phorkie\\Renderer_ReStructuredText',
143     ),
144     'sh' => array(
145         'title' => 'Shell script (Bash)',
146         'mime'  => 'text/x-shellscript',
147         'geshi' => 'bash'
148     ),
149     'sql' => array(
150         'title' => 'SQL',
151         'mime'  => 'text/x-sql',
152         'geshi' => 'sql'
153     ),
154     'svg' => array(
155         'title' => 'SVG image',
156         'mime'  => 'image/svg+xml',
157         'show'  => false
158     ),
159     'txt' => array(
160         'title' => 'Text (plain)',
161         'mime'  => 'text/plain',
162         'geshi' => 'txt'
163     ),
164     'ts' => array(
165         'title' => 'TypoScript',
166         'mime'  => 'text/x-typoscript',/* TODO: correct type */
167         'geshi' => 'typoscript'
168     ),
169     'wsdl' => array(
170         'title' => 'WSDL',
171         'mime'  => 'application/wsdl+xml',
172         'geshi' => 'xml'
173     ),
174     'xml' => array(
175         'title' => 'XML',
176         'mime'  => 'text/xml',
177         'geshi' => 'xml'
178     ),
179     'xsl' => array(
180         'title' => 'eXtensible Stylesheet Language',
181         'mime'  => 'text/xml',
182         'geshi' => 'xml',
183         'show'  => false
184     ),
185 );
186
187 //needed for UTF-8 characters in file names
188 setlocale(LC_CTYPE, 'en_US.UTF_8');
189 ?>