Make random IDs configurable
[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     'randomIds'     => false,
38     'defaultListPage' => 'last',//a number or "last"
39     'notificator'   => array(
40         /* send out pingback/webmentions when a remote paste is forked */
41         'linkback'  => true,
42         'webhook'   => array(
43             /* array of urls that get called when
44                a paste is created, edited or deleted */
45         )
46     ),
47     'geshi'         => 'geshi.php',
48 );
49 $GLOBALS['phorkie']['auth'] = array(
50     // 0 = public, no authentication, 1 = protect adds/edits/deletes,
51     // 2 = require authentication
52     'securityLevel'   => 0,
53     'listedUsersOnly' => false,
54     'users'           => array(),             // Array of OpenIDs that may login
55     'anonymousName'   => 'Anonymous',         // Email for non-authenticated commits
56     'anonymousEmail'  => 'anonymous@phorkie', // Email for non-authenticated commits
57 );
58 $GLOBALS['phorkie']['tools'] = array(
59     '\\phorkie\\Tool_Xmllint' => true,
60     '\\phorkie\\Tool_PHPlint' => true,
61 );
62 /**
63  * Array of supported file types / languages.
64  * Key is the file extension
65  */
66 $GLOBALS['phorkie']['languages'] = array(
67     'conf' => array(
68         'title' => 'Configuration',
69         'mime'  => 'text/ini',
70         'geshi' => 'ini',
71         'show'  => false
72     ),
73     'css' => array(
74         'title' => 'CSS',
75         'mime'  => 'text/css',
76         'geshi' => 'css'
77     ),
78     'diff' => array(
79         'title' => 'Diff',
80         'mime'  => 'text/diff',
81         'geshi' => 'diff'
82     ),
83     'htm' => array(
84         'title' => 'HTML',
85         'mime'  => 'text/html',
86         'geshi' => 'xml'
87     ),
88     'html' => array(
89         'title' => 'HTML',
90         'mime'  => 'text/html',
91         'geshi' => 'xml',
92         'show'  => false
93     ),
94     'jpg' => array(
95         'title' => 'JPEG image',
96         'mime'  => 'image/jpeg',
97         'show'  => false
98     ),
99     'ini' => array(
100         'title' => 'Ini',
101         'mime'  => 'text/ini',
102         'geshi' => 'ini'
103     ),
104     'js' => array(
105         'title' => 'Javascript',
106         'mime'  => 'application/javascript',
107         'geshi' => 'javascript'
108     ),
109     'json' => array(
110         'title' => 'Javascript',
111         'mime'  => 'application/javascript',
112         'geshi' => 'javascript',
113         'show'  => false
114     ),
115     'md' => array(
116         'title' => 'Markdown',
117         'mime'  => 'text/x-markdown',
118         'renderer' => '\\phorkie\\Renderer_Markdown'
119     ),
120     'pl' => array(
121         'title' => 'Perl',
122         'mime'  => 'application/x-perl',
123         'geshi' => 'pl'
124     ),
125     'php' => array(
126         'title' => 'PHP',
127         'mime'  => 'text/x-php',
128         'geshi' => 'php'
129     ),
130     'png' => array(
131         'title' => 'PNG image',
132         'mime'  => 'image/png',
133         'show'  => false
134     ),
135     'rb' => array(
136         'title' => 'Ruby/Rails',
137         'mime'  => 'text/x-ruby', /* Is this an acceptable mime type? */
138         'geshi' => 'rails'
139     ),
140     'rst' => array(
141         'title' => 'reStructuredText',
142         'mime'  => 'text/x-rst',
143         'geshi' => 'rst',
144         'renderer' => '\\phorkie\\Renderer_ReStructuredText',
145     ),
146     'sh' => array(
147         'title' => 'Shell script (Bash)',
148         'mime'  => 'text/x-shellscript',
149         'geshi' => 'bash'
150     ),
151     'sql' => array(
152         'title' => 'SQL',
153         'mime'  => 'text/x-sql',
154         'geshi' => 'sql'
155     ),
156     'svg' => array(
157         'title' => 'SVG image',
158         'mime'  => 'image/svg+xml',
159         'show'  => false
160     ),
161     'txt' => array(
162         'title' => 'Text (plain)',
163         'mime'  => 'text/plain',
164         'geshi' => 'txt'
165     ),
166     'ts' => array(
167         'title' => 'TypoScript',
168         'mime'  => 'text/x-typoscript',/* TODO: correct type */
169         'geshi' => 'typoscript'
170     ),
171     'wsdl' => array(
172         'title' => 'WSDL',
173         'mime'  => 'application/wsdl+xml',
174         'geshi' => 'xml'
175     ),
176     'xml' => array(
177         'title' => 'XML',
178         'mime'  => 'text/xml',
179         'geshi' => 'xml'
180     ),
181     'xsl' => array(
182         'title' => 'eXtensible Stylesheet Language',
183         'mime'  => 'text/xml',
184         'geshi' => 'xml',
185         'show'  => false
186     ),
187 );
188
189 //needed for UTF-8 characters in file names
190 setlocale(LC_CTYPE, 'en_US.UTF_8');
191 ?>