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